From b01f60144ebff3b452692d38cf3a1439b3f3a37d Mon Sep 17 00:00:00 2001 From: OutdatedGuy Date: Fri, 29 Dec 2023 23:51:29 +0530 Subject: [PATCH] refactor: using more specific types --- lib/config/macos_config.dart | 2 +- lib/config/web_config.dart | 2 +- lib/config/windows_config.dart | 4 ++-- test/windows/windows_icon_generator_test.mocks.dart | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/config/macos_config.dart b/lib/config/macos_config.dart index a7553f2544..cd65d04cbe 100644 --- a/lib/config/macos_config.dart +++ b/lib/config/macos_config.dart @@ -23,7 +23,7 @@ class MacOSConfig { }); /// Creates [WebConfig] from [json] - factory MacOSConfig.fromJson(Map json) { + factory MacOSConfig.fromJson(Map json) { return _$MacOSConfigFromJson(json); } diff --git a/lib/config/web_config.dart b/lib/config/web_config.dart index 4b3454d59d..6023f698b6 100644 --- a/lib/config/web_config.dart +++ b/lib/config/web_config.dart @@ -32,7 +32,7 @@ class WebConfig { }); /// Creates [WebConfig] from [json] - factory WebConfig.fromJson(Map json) { + factory WebConfig.fromJson(Map json) { return _$WebConfigFromJson(json); } diff --git a/lib/config/windows_config.dart b/lib/config/windows_config.dart index 32483cc243..f4cf7260aa 100644 --- a/lib/config/windows_config.dart +++ b/lib/config/windows_config.dart @@ -27,12 +27,12 @@ class WindowsConfig { }); /// Creates [WindowsConfig] from [json] - factory WindowsConfig.fromJson(Map json) { + factory WindowsConfig.fromJson(Map json) { return _$WindowsConfigFromJson(json); } /// Creates [Map] from [WindowsConfig] - Map toJson() => _$WindowsConfigToJson(this); + Map toJson() => _$WindowsConfigToJson(this); @override String toString() => 'WindowsConfig: ${toJson()}'; diff --git a/test/windows/windows_icon_generator_test.mocks.dart b/test/windows/windows_icon_generator_test.mocks.dart index 9cd13510eb..cb96f9d5c4 100644 --- a/test/windows/windows_icon_generator_test.mocks.dart +++ b/test/windows/windows_icon_generator_test.mocks.dart @@ -157,13 +157,13 @@ class MockWindowsConfig extends _i1.Mock implements _i5.WindowsConfig { ) as bool); @override - Map toJson() => (super.noSuchMethod( + Map toJson() => (super.noSuchMethod( Invocation.method( #toJson, [], ), returnValue: {}, - ) as Map); + ) as Map); } /// A class which mocks [FLILogger].