Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export observable.dart #141

Closed
wants to merge 1 commit into from

Conversation

cmengler
Copy link

@cmengler cmengler commented Nov 5, 2020

Please ignore if it's intentional to optionally import observable.dart due to the use of extensions / support for earlier dart SDKs -- the reason for PR was to satisfy analyzer linter rule for implementation_imports (Don't import implementation files from another package.)

@vaind
Copy link
Contributor

vaind commented Nov 5, 2020

Would the following patch (i.e. adding lib/observable.dart) satisfy the linter while keeping SDK support to 2.6.0?

Index: example/flutter/objectbox_demo/lib/main.dart
===================================================================
--- example/flutter/objectbox_demo/lib/main.dart	(revision ed99ffebc698e32d67d5e40d68c19c94b66d1c15)
+++ example/flutter/objectbox_demo/lib/main.dart	(date 1604571112304)
@@ -3,7 +3,7 @@
 import 'package:intl/intl.dart';
 import 'package:path_provider/path_provider.dart';
 import 'objectbox.g.dart';
-import 'package:objectbox/src/observable.dart';
+import 'package:objectbox/observable.dart';
 import 'dart:async';
 import 'dart:io';
 
Index: README.md
===================================================================
--- README.md	(revision ed99ffebc698e32d67d5e40d68c19c94b66d1c15)
+++ README.md	(date 1604571122078)
@@ -164,7 +164,7 @@
 Note: Dart Streams can be extended with [rxdart](https://github.com/ReactiveX/rxdart).
 
 ```dart
-    import "package:objectbox/src/observable.dart";
+    import "package:objectbox/observable.dart";
 
     // final store = ...
     final query = box.query(condition).build();
Index: test/stream_test.dart
===================================================================
--- test/stream_test.dart	(revision ed99ffebc698e32d67d5e40d68c19c94b66d1c15)
+++ test/stream_test.dart	(date 1604570980115)
@@ -1,6 +1,6 @@
 import 'dart:async';
 
-import 'package:objectbox/src/observable.dart';
+import 'package:objectbox/observable.dart';
 import 'package:test/test.dart';
 
 import 'entity.dart';
Index: lib/observable.dart
===================================================================
--- lib/observable.dart	(date 1604571085857)
+++ lib/observable.dart	(date 1604571085857)
@@ -0,0 +1,1 @@
+export 'src/observable.dart';

@cmengler
Copy link
Author

cmengler commented Nov 5, 2020

Perfect @vaind -- that work's well, much better approach! 👍

@cmengler
Copy link
Author

cmengler commented Nov 5, 2020

Would you like me to update PR using your patch instead -- or close this and leave for you?

@vaind
Copy link
Contributor

vaind commented Nov 5, 2020

Already landed in main and going to be released in a bit

c87b566

@vaind vaind closed this Nov 5, 2020
@cmengler
Copy link
Author

cmengler commented Nov 5, 2020

Nice work! thank you very much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants