Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ened committed Apr 8, 2024
1 parent 334bd09 commit d1df368
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
3 changes: 2 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ class _MyAppState extends State<MyApp> {
child: Text("isscheduled (Android)"),
onPressed: Platform.isAndroid
? () async {
final workInfo = await Workmanager().isScheduledByUniqueName(
final workInfo =
await Workmanager().isScheduledByUniqueName(
simplePeriodicTask,
);
print('isscheduled = $workInfo');
Expand Down
8 changes: 1 addition & 7 deletions workmanager/test/json_mapper_helper_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void main() {
'uniqueName': 'uniqueName',
'taskName': 'taskName',
'tag': null,
'flexInterval':null,
'flexInterval': null,
'frequency': null,
'existingWorkPolicy': null,
'initialDelaySeconds': null,
Expand Down Expand Up @@ -189,7 +189,6 @@ void main() {
'tag': null,
'frequency': null,
'flexInterval': null,

'existingWorkPolicy': null,
'initialDelaySeconds': 1,
'networkType': 'connected',
Expand Down Expand Up @@ -218,7 +217,6 @@ void main() {
'tag': null,
'frequency': null,
'flexInterval': null,

'existingWorkPolicy': null,
'initialDelaySeconds': 1,
'networkType': 'metered',
Expand All @@ -241,7 +239,6 @@ void main() {
'tag': null,
'frequency': null,
'flexInterval': null,

'existingWorkPolicy': null,
'initialDelaySeconds': 1,
'networkType': 'metered',
Expand Down Expand Up @@ -270,7 +267,6 @@ void main() {
'tag': null,
'frequency': null,
'flexInterval': null,

'existingWorkPolicy': null,
'initialDelaySeconds': 1,
'networkType': 'not_roaming',
Expand Down Expand Up @@ -299,7 +295,6 @@ void main() {
'tag': null,
'frequency': null,
'flexInterval': null,

'existingWorkPolicy': null,
'initialDelaySeconds': 1,
'networkType': 'unmetered',
Expand Down Expand Up @@ -354,7 +349,6 @@ void main() {
'tag': null,
'frequency': null,
'flexInterval': null,

'existingWorkPolicy': existingWorkPolicy[1],
'initialDelaySeconds': 1,
'networkType': null,
Expand Down
29 changes: 19 additions & 10 deletions workmanager/test/workmanager_test.mocks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> initialize(Function? callbackDispatcher, {bool? isInDebugMode = false}) =>
(super.noSuchMethod(Invocation.method(#initialize, [callbackDispatcher], {#isInDebugMode: isInDebugMode}),
returnValue: Future<void>.value(), returnValueForMissingStub: Future<void>.value()) as _i3.Future<void>);
_i3.Future<void> initialize(Function? callbackDispatcher,
{bool? isInDebugMode = false}) =>
(super.noSuchMethod(
Invocation.method(#initialize, [callbackDispatcher],
{#isInDebugMode: isInDebugMode}),
returnValue: Future<void>.value(),
returnValueForMissingStub: Future<void>.value()) as _i3.Future<void>);

@override
_i3.Future<void> registerOneOffTask(String? uniqueName, String? taskName,
Expand Down Expand Up @@ -92,16 +97,20 @@ class MockWorkmanager extends _i1.Mock implements _i2.Workmanager {
returnValueForMissingStub: Future<void>.value()) as _i3.Future<void>);

@override
_i3.Future<void> cancelByUniqueName(String? uniqueName) => (super.noSuchMethod(Invocation.method(#cancelByUniqueName, [uniqueName]),
returnValue: Future<void>.value(), returnValueForMissingStub: Future<void>.value()) as _i3.Future<void>);
_i3.Future<void> cancelByUniqueName(String? uniqueName) =>
(super.noSuchMethod(Invocation.method(#cancelByUniqueName, [uniqueName]),
returnValue: Future<void>.value(),
returnValueForMissingStub: Future<void>.value()) as _i3.Future<void>);

@override
_i3.Future<void> cancelByTag(String? tag) =>
(super.noSuchMethod(Invocation.method(#cancelByTag, [tag]), returnValue: Future<void>.value(), returnValueForMissingStub: Future<void>.value())
as _i3.Future<void>);
(super.noSuchMethod(Invocation.method(#cancelByTag, [tag]),
returnValue: Future<void>.value(),
returnValueForMissingStub: Future<void>.value()) as _i3.Future<void>);

@override
_i3.Future<void> cancelAll() =>
(super.noSuchMethod(Invocation.method(#cancelAll, []), returnValue: Future<void>.value(), returnValueForMissingStub: Future<void>.value())
as _i3.Future<void>);
(super.noSuchMethod(Invocation.method(#cancelAll, []),
returnValue: Future<void>.value(),
returnValueForMissingStub: Future<void>.value()) as _i3.Future<void>);
}

0 comments on commit d1df368

Please sign in to comment.