Fix MissedPluginException for workmanager
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user