Open
Description
I just started using your package and see that I have to import every file separately for your notion package. There are 2 conventions you need to follow which is used by all packages.
- Could you please update your package to export all required files properly so that we don't have too many dependencies on file imports in our classes. Currently for this small bit of code.
Future<void> createPage({required String pageId}) {
Page page = Page(
parent: Parent.page(id: 'YOUR_PAGE_ID'), // <- page
title: Text('NotionClient (v1): Page test'),
);
}
I have to import all of this
import 'package:notion_api/notion.dart';
import 'package:notion_api/notion/general/rich_text.dart';
import 'package:notion_api/notion/objects/pages.dart';
import 'package:notion_api/notion/objects/parent.dart';
It should only be
import 'package:notion_api/notion.dart';
To achieve this all you have to do is declare an export in your notion.dart file.
export 'notion/general/rich_text.dart';
export 'notion/objects/pages.dart';
export 'notion/objects/parent.dart';
- Move private code into a folder called
src
. At the moment it's all accessible and when you do improve your code it will break all projects that use this. It's better to do it early.
Metadata
Metadata
Assignees
Labels
No labels