Fix MissedPluginException for workmanager
This commit is contained in:
parent
7c18454de3
commit
7969f54d3b
@ -176,12 +176,7 @@ void main() async {
|
||||
};
|
||||
|
||||
runZoned(() {
|
||||
workManager.Workmanager.initialize(
|
||||
updateDeviceLocationIsolate,
|
||||
isInDebugMode: false
|
||||
);
|
||||
runApp(new HAClientApp());
|
||||
|
||||
}, onError: (error, stack) {
|
||||
_reportError(error, stack);
|
||||
});
|
||||
|
@ -30,12 +30,16 @@ class _MainPageState extends ReceiveShareState<MainPage> with WidgetsBindingObse
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
final Stream purchaseUpdates =
|
||||
InAppPurchaseConnection.instance.purchaseUpdatedStream;
|
||||
_subscription = purchaseUpdates.listen((purchases) {
|
||||
_handlePurchaseUpdates(purchases);
|
||||
});
|
||||
super.initState();
|
||||
workManager.Workmanager.initialize(
|
||||
updateDeviceLocationIsolate,
|
||||
isInDebugMode: false
|
||||
);
|
||||
enableShareReceiving();
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
|
||||
|
@ -27,7 +27,7 @@ dependencies:
|
||||
device_info: ^0.4.0+3
|
||||
flutter_local_notifications: ^0.8.4
|
||||
geolocator: ^5.1.5
|
||||
workmanager: ^0.1.3
|
||||
workmanager: ^0.1.5
|
||||
battery: ^0.3.1+1
|
||||
sentry: ^2.3.1
|
||||
share:
|
||||
|
Reference in New Issue
Block a user