pwa
pwa copied to clipboard
Make library compilable for Native Dart
#38 #32
- [x] Let's rename client.dart into pwa.dart. This should give us a clear entry point.
- [x] It should also export the interface.dart.
- [x] Let's move the platform-specific parts, and maybe also interface.dart inside lib/src.
- [x] Let's use createPwaClient() instead of Client.create. (Client is now a single-method abstract class, no need for it).
- [x] Let's rename BaseClient to Client (since Client is gone, and reducing breaking change's scope).
- [ ] Let's bump version to 0.3.0 and also write a small note in CHANGELOG.md
- [ ] Let's update examples.
In fact, I don't know how to test a flutter library until I met this post. So, I made a new working update.
New registration way:
import 'package:pwa/client.dart' as pwa;
void main() async {
// register PWA ServiceWorker for offline caching.
pwa.Client.create();
// ...
}
I think this is going in the right direction, but I still would like to request a few refactor changes:
- Let's rename
client.dart
intopwa.dart
. This should give us a clear entry point. - It should also export the
interface.dart
. - Let's move the platform-specific parts, and maybe also
interface.dart
insidelib/src
. - Let's use
createPwaClient()
instead ofClient.create
. (Client
is now a single-method abstract class, no need for it). - Let's rename
BaseClient
toClient
(sinceClient
is gone, and reducing breaking change's scope). - Let's bump version to
0.3.0
and also write a small note inCHANGELOG.md
- Let's update examples.
I think the first few are just quick mechanic changes, maybe the last point will be a bit more work, but after that this is ready to go.
Ok captin, let's made a checklist for this.
New registration way now is:
import 'package:pwa/pwa.dart' as pwa;
void main() async {
// register PWA ServiceWorker for offline caching.
pwa.Client.create();
// ...
}
New registration way now is:
import 'package:pwa/pwa.dart';
void main() async {
// register PWA ServiceWorker for offline caching.
createPwaClient();
// ...
}
- Let's bump version to
0.3.0
and also write a small note inCHANGELOG.md
I think this can now be bumped up then we can update the examples easily.
Any updates on this?