diff --git a/example/lib/main.dart b/example/lib/main.dart index d6267964..b9153421 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -277,7 +277,8 @@ class _MyAppState extends State { child: Text("isscheduled (Android)"), onPressed: Platform.isAndroid ? () async { - final workInfo = await Workmanager().isScheduledByUniqueName( + final workInfo = + await Workmanager().isScheduledByUniqueName( simplePeriodicTask, ); print('isscheduled = $workInfo'); diff --git a/workmanager/test/json_mapper_helper_test.dart b/workmanager/test/json_mapper_helper_test.dart index 924a70dd..44742e0a 100644 --- a/workmanager/test/json_mapper_helper_test.dart +++ b/workmanager/test/json_mapper_helper_test.dart @@ -48,7 +48,7 @@ void main() { 'uniqueName': 'uniqueName', 'taskName': 'taskName', 'tag': null, - 'flexInterval':null, + 'flexInterval': null, 'frequency': null, 'existingWorkPolicy': null, 'initialDelaySeconds': null, @@ -189,7 +189,6 @@ void main() { 'tag': null, 'frequency': null, 'flexInterval': null, - 'existingWorkPolicy': null, 'initialDelaySeconds': 1, 'networkType': 'connected', @@ -218,7 +217,6 @@ void main() { 'tag': null, 'frequency': null, 'flexInterval': null, - 'existingWorkPolicy': null, 'initialDelaySeconds': 1, 'networkType': 'metered', @@ -241,7 +239,6 @@ void main() { 'tag': null, 'frequency': null, 'flexInterval': null, - 'existingWorkPolicy': null, 'initialDelaySeconds': 1, 'networkType': 'metered', @@ -270,7 +267,6 @@ void main() { 'tag': null, 'frequency': null, 'flexInterval': null, - 'existingWorkPolicy': null, 'initialDelaySeconds': 1, 'networkType': 'not_roaming', @@ -299,7 +295,6 @@ void main() { 'tag': null, 'frequency': null, 'flexInterval': null, - 'existingWorkPolicy': null, 'initialDelaySeconds': 1, 'networkType': 'unmetered', @@ -354,7 +349,6 @@ void main() { 'tag': null, 'frequency': null, 'flexInterval': null, - 'existingWorkPolicy': existingWorkPolicy[1], 'initialDelaySeconds': 1, 'networkType': null, diff --git a/workmanager/test/workmanager_test.mocks.dart b/workmanager/test/workmanager_test.mocks.dart index f784fd73..b973630a 100644 --- a/workmanager/test/workmanager_test.mocks.dart +++ b/workmanager/test/workmanager_test.mocks.dart @@ -27,12 +27,17 @@ class MockWorkmanager extends _i1.Mock implements _i2.Workmanager { @override void executeTask(_i2.BackgroundTaskHandler? backgroundTask) => - super.noSuchMethod(Invocation.method(#executeTask, [backgroundTask]), returnValueForMissingStub: null); + super.noSuchMethod(Invocation.method(#executeTask, [backgroundTask]), + returnValueForMissingStub: null); @override - _i3.Future initialize(Function? callbackDispatcher, {bool? isInDebugMode = false}) => - (super.noSuchMethod(Invocation.method(#initialize, [callbackDispatcher], {#isInDebugMode: isInDebugMode}), - returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future initialize(Function? callbackDispatcher, + {bool? isInDebugMode = false}) => + (super.noSuchMethod( + Invocation.method(#initialize, [callbackDispatcher], + {#isInDebugMode: isInDebugMode}), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i3.Future); @override _i3.Future registerOneOffTask(String? uniqueName, String? taskName, @@ -92,16 +97,20 @@ class MockWorkmanager extends _i1.Mock implements _i2.Workmanager { returnValueForMissingStub: Future.value()) as _i3.Future); @override - _i3.Future cancelByUniqueName(String? uniqueName) => (super.noSuchMethod(Invocation.method(#cancelByUniqueName, [uniqueName]), - returnValue: Future.value(), returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future cancelByUniqueName(String? uniqueName) => + (super.noSuchMethod(Invocation.method(#cancelByUniqueName, [uniqueName]), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i3.Future); @override _i3.Future cancelByTag(String? tag) => - (super.noSuchMethod(Invocation.method(#cancelByTag, [tag]), returnValue: Future.value(), returnValueForMissingStub: Future.value()) - as _i3.Future); + (super.noSuchMethod(Invocation.method(#cancelByTag, [tag]), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i3.Future); @override _i3.Future cancelAll() => - (super.noSuchMethod(Invocation.method(#cancelAll, []), returnValue: Future.value(), returnValueForMissingStub: Future.value()) - as _i3.Future); + (super.noSuchMethod(Invocation.method(#cancelAll, []), + returnValue: Future.value(), + returnValueForMissingStub: Future.value()) as _i3.Future); }