From 8efdef47f1e488bb1311473aaede15aed4099946 Mon Sep 17 00:00:00 2001 From: OutdatedGuy Date: Fri, 29 Dec 2023 23:51:34 +0530 Subject: [PATCH] chore: ran build_runner to generate code --- lib/config/config.g.dart | 20 +++++++--- pubspec.yaml | 2 +- test/abs/icon_generator_test.mocks.dart | 29 ++++++++++++-- .../macos_icon_generator_test.mocks.dart | 40 +++++++++++++++---- .../windows_icon_generator_test.mocks.dart | 37 +++++++++++++---- 5 files changed, 105 insertions(+), 23 deletions(-) diff --git a/lib/config/config.g.dart b/lib/config/config.g.dart index 2be66ae374..1646b20771 100644 --- a/lib/config/config.g.dart +++ b/lib/config/config.g.dart @@ -30,11 +30,21 @@ Config _$ConfigFromJson(Map json) => $checkedCreate( backgroundColorIOS: $checkedConvert( 'background_color_ios', (v) => v as String? ?? '#ffffff'), webConfig: $checkedConvert( - 'web', (v) => v == null ? null : WebConfig.fromJson(v as Map)), - windowsConfig: $checkedConvert('windows', - (v) => v == null ? null : WindowsConfig.fromJson(v as Map)), - macOSConfig: $checkedConvert('macos', - (v) => v == null ? null : MacOSConfig.fromJson(v as Map)), + 'web', + (v) => v == null + ? null + : WebConfig.fromJson(Map.from(v as Map))), + windowsConfig: $checkedConvert( + 'windows', + (v) => v == null + ? null + : WindowsConfig.fromJson( + Map.from(v as Map))), + macOSConfig: $checkedConvert( + 'macos', + (v) => v == null + ? null + : MacOSConfig.fromJson(Map.from(v as Map))), ); return val; }, diff --git a/pubspec.yaml b/pubspec.yaml index f35f8462a8..d2c80d45b7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: checked_yaml: ^2.0.2 cli_util: ^0.4.0 image: ^4.0.15 - json_annotation: ^4.8.0 + json_annotation: ^4.8.1 path: ^1.8.2 yaml: ^3.1.1 diff --git a/test/abs/icon_generator_test.mocks.dart b/test/abs/icon_generator_test.mocks.dart index 0b320f4f56..c0d386aafa 100644 --- a/test/abs/icon_generator_test.mocks.dart +++ b/test/abs/icon_generator_test.mocks.dart @@ -1,4 +1,4 @@ -// Mocks generated by Mockito 5.4.2 from annotations +// Mocks generated by Mockito 5.4.3 from annotations // in flutter_launcher_icons/test/abs/icon_generator_test.dart. // Do not manually edit this file. @@ -6,11 +6,14 @@ import 'package:flutter_launcher_icons/abs/icon_generator.dart' as _i2; import 'package:flutter_launcher_icons/config/config.dart' as _i3; import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i4; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors @@ -42,21 +45,28 @@ class MockConfig extends _i1.Mock implements _i3.Config { Invocation.getter(#minSdkAndroid), returnValue: 0, ) as int); + @override bool get removeAlphaIOS => (super.noSuchMethod( Invocation.getter(#removeAlphaIOS), returnValue: false, ) as bool); + @override String get backgroundColorIOS => (super.noSuchMethod( Invocation.getter(#backgroundColorIOS), - returnValue: '', + returnValue: _i4.dummyValue( + this, + Invocation.getter(#backgroundColorIOS), + ), ) as String); + @override bool get hasAndroidAdaptiveConfig => (super.noSuchMethod( Invocation.getter(#hasAndroidAdaptiveConfig), returnValue: false, ) as bool); + @override bool get hasAndroidAdaptiveMonochromeConfig => (super.noSuchMethod( Invocation.getter(#hasAndroidAdaptiveMonochromeConfig), @@ -67,36 +77,43 @@ class MockConfig extends _i1.Mock implements _i3.Config { Invocation.getter(#hasPlatformConfig), returnValue: false, ) as bool); + @override bool get hasWebConfig => (super.noSuchMethod( Invocation.getter(#hasWebConfig), returnValue: false, ) as bool); + @override bool get hasWindowsConfig => (super.noSuchMethod( Invocation.getter(#hasWindowsConfig), returnValue: false, ) as bool); + @override bool get hasMacOSConfig => (super.noSuchMethod( Invocation.getter(#hasMacOSConfig), returnValue: false, ) as bool); + @override bool get isCustomAndroidFile => (super.noSuchMethod( Invocation.getter(#isCustomAndroidFile), returnValue: false, ) as bool); + @override bool get isNeedingNewAndroidIcon => (super.noSuchMethod( Invocation.getter(#isNeedingNewAndroidIcon), returnValue: false, ) as bool); + @override bool get isNeedingNewIOSIcon => (super.noSuchMethod( Invocation.getter(#isNeedingNewIOSIcon), returnValue: false, ) as bool); + @override Map toJson() => (super.noSuchMethod( Invocation.method( @@ -123,11 +140,16 @@ class MockIconGenerator extends _i1.Mock implements _i2.IconGenerator { Invocation.getter(#context), ), ) as _i2.IconGeneratorContext); + @override String get platformName => (super.noSuchMethod( Invocation.getter(#platformName), - returnValue: '', + returnValue: _i4.dummyValue( + this, + Invocation.getter(#platformName), + ), ) as String); + @override void createIcons() => super.noSuchMethod( Invocation.method( @@ -136,6 +158,7 @@ class MockIconGenerator extends _i1.Mock implements _i2.IconGenerator { ), returnValueForMissingStub: null, ); + @override bool validateRequirements() => (super.noSuchMethod( Invocation.method( diff --git a/test/macos/macos_icon_generator_test.mocks.dart b/test/macos/macos_icon_generator_test.mocks.dart index 6d6509666e..59b5c465f9 100644 --- a/test/macos/macos_icon_generator_test.mocks.dart +++ b/test/macos/macos_icon_generator_test.mocks.dart @@ -1,18 +1,21 @@ -// Mocks generated by Mockito 5.4.2 from annotations +// Mocks generated by Mockito 5.4.3 from annotations // in flutter_launcher_icons/test/macos/macos_icon_generator_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:cli_util/cli_logging.dart' as _i2; import 'package:flutter_launcher_icons/config/config.dart' as _i3; -import 'package:flutter_launcher_icons/config/macos_config.dart' as _i4; -import 'package:flutter_launcher_icons/logger.dart' as _i5; +import 'package:flutter_launcher_icons/config/macos_config.dart' as _i5; +import 'package:flutter_launcher_icons/logger.dart' as _i6; import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i4; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors @@ -50,24 +53,34 @@ class MockConfig extends _i1.Mock implements _i3.Config { returnValue: 0, returnValueForMissingStub: 0, ) as int); + @override bool get removeAlphaIOS => (super.noSuchMethod( Invocation.getter(#removeAlphaIOS), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override String get backgroundColorIOS => (super.noSuchMethod( Invocation.getter(#backgroundColorIOS), - returnValue: '', - returnValueForMissingStub: '', + returnValue: _i4.dummyValue( + this, + Invocation.getter(#backgroundColorIOS), + ), + returnValueForMissingStub: _i4.dummyValue( + this, + Invocation.getter(#backgroundColorIOS), + ), ) as String); + @override bool get hasAndroidAdaptiveConfig => (super.noSuchMethod( Invocation.getter(#hasAndroidAdaptiveConfig), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get hasAndroidAdaptiveMonochromeConfig => (super.noSuchMethod( Invocation.getter(#hasAndroidAdaptiveMonochromeConfig), @@ -80,42 +93,49 @@ class MockConfig extends _i1.Mock implements _i3.Config { returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get hasWebConfig => (super.noSuchMethod( Invocation.getter(#hasWebConfig), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get hasWindowsConfig => (super.noSuchMethod( Invocation.getter(#hasWindowsConfig), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get hasMacOSConfig => (super.noSuchMethod( Invocation.getter(#hasMacOSConfig), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get isCustomAndroidFile => (super.noSuchMethod( Invocation.getter(#isCustomAndroidFile), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get isNeedingNewAndroidIcon => (super.noSuchMethod( Invocation.getter(#isNeedingNewAndroidIcon), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override bool get isNeedingNewIOSIcon => (super.noSuchMethod( Invocation.getter(#isNeedingNewIOSIcon), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override Map toJson() => (super.noSuchMethod( Invocation.method( @@ -130,13 +150,14 @@ class MockConfig extends _i1.Mock implements _i3.Config { /// A class which mocks [MacOSConfig]. /// /// See the documentation for Mockito's code generation for more information. -class MockMacOSConfig extends _i1.Mock implements _i4.MacOSConfig { +class MockMacOSConfig extends _i1.Mock implements _i5.MacOSConfig { @override bool get generate => (super.noSuchMethod( Invocation.getter(#generate), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override Map toJson() => (super.noSuchMethod( Invocation.method( @@ -151,13 +172,14 @@ class MockMacOSConfig extends _i1.Mock implements _i4.MacOSConfig { /// A class which mocks [FLILogger]. /// /// See the documentation for Mockito's code generation for more information. -class MockFLILogger extends _i1.Mock implements _i5.FLILogger { +class MockFLILogger extends _i1.Mock implements _i6.FLILogger { @override bool get isVerbose => (super.noSuchMethod( Invocation.getter(#isVerbose), returnValue: false, returnValueForMissingStub: false, ) as bool); + @override _i2.Logger get rawLogger => (super.noSuchMethod( Invocation.getter(#rawLogger), @@ -170,6 +192,7 @@ class MockFLILogger extends _i1.Mock implements _i5.FLILogger { Invocation.getter(#rawLogger), ), ) as _i2.Logger); + @override void error(Object? message) => super.noSuchMethod( Invocation.method( @@ -178,6 +201,7 @@ class MockFLILogger extends _i1.Mock implements _i5.FLILogger { ), returnValueForMissingStub: null, ); + @override void verbose(Object? message) => super.noSuchMethod( Invocation.method( @@ -186,6 +210,7 @@ class MockFLILogger extends _i1.Mock implements _i5.FLILogger { ), returnValueForMissingStub: null, ); + @override void info(Object? message) => super.noSuchMethod( Invocation.method( @@ -194,6 +219,7 @@ class MockFLILogger extends _i1.Mock implements _i5.FLILogger { ), returnValueForMissingStub: null, ); + @override _i2.Progress progress(String? message) => (super.noSuchMethod( Invocation.method( diff --git a/test/windows/windows_icon_generator_test.mocks.dart b/test/windows/windows_icon_generator_test.mocks.dart index 3067683475..affb74e73d 100644 --- a/test/windows/windows_icon_generator_test.mocks.dart +++ b/test/windows/windows_icon_generator_test.mocks.dart @@ -1,18 +1,21 @@ -// Mocks generated by Mockito 5.4.2 from annotations +// Mocks generated by Mockito 5.4.3 from annotations // in flutter_launcher_icons/test/windows/windows_icon_generator_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes import 'package:cli_util/cli_logging.dart' as _i2; import 'package:flutter_launcher_icons/config/config.dart' as _i3; -import 'package:flutter_launcher_icons/config/windows_config.dart' as _i4; -import 'package:flutter_launcher_icons/logger.dart' as _i5; +import 'package:flutter_launcher_icons/config/windows_config.dart' as _i5; +import 'package:flutter_launcher_icons/logger.dart' as _i6; import 'package:mockito/mockito.dart' as _i1; +import 'package:mockito/src/dummies.dart' as _i4; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors @@ -53,21 +56,28 @@ class MockConfig extends _i1.Mock implements _i3.Config { Invocation.getter(#minSdkAndroid), returnValue: 0, ) as int); + @override bool get removeAlphaIOS => (super.noSuchMethod( Invocation.getter(#removeAlphaIOS), returnValue: false, ) as bool); + @override String get backgroundColorIOS => (super.noSuchMethod( Invocation.getter(#backgroundColorIOS), - returnValue: '', + returnValue: _i4.dummyValue( + this, + Invocation.getter(#backgroundColorIOS), + ), ) as String); + @override bool get hasAndroidAdaptiveConfig => (super.noSuchMethod( Invocation.getter(#hasAndroidAdaptiveConfig), returnValue: false, ) as bool); + @override bool get hasAndroidAdaptiveMonochromeConfig => (super.noSuchMethod( Invocation.getter(#hasAndroidAdaptiveMonochromeConfig), @@ -78,36 +88,43 @@ class MockConfig extends _i1.Mock implements _i3.Config { Invocation.getter(#hasPlatformConfig), returnValue: false, ) as bool); + @override bool get hasWebConfig => (super.noSuchMethod( Invocation.getter(#hasWebConfig), returnValue: false, ) as bool); + @override bool get hasWindowsConfig => (super.noSuchMethod( Invocation.getter(#hasWindowsConfig), returnValue: false, ) as bool); + @override bool get hasMacOSConfig => (super.noSuchMethod( Invocation.getter(#hasMacOSConfig), returnValue: false, ) as bool); + @override bool get isCustomAndroidFile => (super.noSuchMethod( Invocation.getter(#isCustomAndroidFile), returnValue: false, ) as bool); + @override bool get isNeedingNewAndroidIcon => (super.noSuchMethod( Invocation.getter(#isNeedingNewAndroidIcon), returnValue: false, ) as bool); + @override bool get isNeedingNewIOSIcon => (super.noSuchMethod( Invocation.getter(#isNeedingNewIOSIcon), returnValue: false, ) as bool); + @override Map toJson() => (super.noSuchMethod( Invocation.method( @@ -121,7 +138,7 @@ class MockConfig extends _i1.Mock implements _i3.Config { /// A class which mocks [WindowsConfig]. /// /// See the documentation for Mockito's code generation for more information. -class MockWindowsConfig extends _i1.Mock implements _i4.WindowsConfig { +class MockWindowsConfig extends _i1.Mock implements _i5.WindowsConfig { MockWindowsConfig() { _i1.throwOnMissingStub(this); } @@ -131,20 +148,21 @@ class MockWindowsConfig extends _i1.Mock implements _i4.WindowsConfig { Invocation.getter(#generate), returnValue: false, ) as bool); + @override Map toJson() => (super.noSuchMethod( Invocation.method( #toJson, [], ), - returnValue: {}, + returnValue: {}, ) as Map); } /// A class which mocks [FLILogger]. /// /// See the documentation for Mockito's code generation for more information. -class MockFLILogger extends _i1.Mock implements _i5.FLILogger { +class MockFLILogger extends _i1.Mock implements _i6.FLILogger { MockFLILogger() { _i1.throwOnMissingStub(this); } @@ -154,6 +172,7 @@ class MockFLILogger extends _i1.Mock implements _i5.FLILogger { Invocation.getter(#isVerbose), returnValue: false, ) as bool); + @override _i2.Logger get rawLogger => (super.noSuchMethod( Invocation.getter(#rawLogger), @@ -162,6 +181,7 @@ class MockFLILogger extends _i1.Mock implements _i5.FLILogger { Invocation.getter(#rawLogger), ), ) as _i2.Logger); + @override void error(Object? message) => super.noSuchMethod( Invocation.method( @@ -170,6 +190,7 @@ class MockFLILogger extends _i1.Mock implements _i5.FLILogger { ), returnValueForMissingStub: null, ); + @override void verbose(Object? message) => super.noSuchMethod( Invocation.method( @@ -178,6 +199,7 @@ class MockFLILogger extends _i1.Mock implements _i5.FLILogger { ), returnValueForMissingStub: null, ); + @override void info(Object? message) => super.noSuchMethod( Invocation.method( @@ -186,6 +208,7 @@ class MockFLILogger extends _i1.Mock implements _i5.FLILogger { ), returnValueForMissingStub: null, ); + @override _i2.Progress progress(String? message) => (super.noSuchMethod( Invocation.method(