Skip to content

Commit

Permalink
refactor: using more specific types
Browse files Browse the repository at this point in the history
  • Loading branch information
OutdatedGuy committed Sep 21, 2024
1 parent fa36cee commit b01f601
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/config/macos_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MacOSConfig {
});

/// Creates [WebConfig] from [json]
factory MacOSConfig.fromJson(Map<dynamic, dynamic> json) {
factory MacOSConfig.fromJson(Map<String, dynamic> json) {
return _$MacOSConfigFromJson(json);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/config/web_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class WebConfig {
});

/// Creates [WebConfig] from [json]
factory WebConfig.fromJson(Map<dynamic, dynamic> json) {
factory WebConfig.fromJson(Map<String, dynamic> json) {
return _$WebConfigFromJson(json);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/config/windows_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ class WindowsConfig {
});

/// Creates [WindowsConfig] from [json]
factory WindowsConfig.fromJson(Map<dynamic, dynamic> json) {
factory WindowsConfig.fromJson(Map<String, dynamic> json) {
return _$WindowsConfigFromJson(json);
}

/// Creates [Map] from [WindowsConfig]
Map<dynamic, dynamic> toJson() => _$WindowsConfigToJson(this);
Map<String, dynamic> toJson() => _$WindowsConfigToJson(this);

@override
String toString() => 'WindowsConfig: ${toJson()}';
Expand Down
4 changes: 2 additions & 2 deletions test/windows/windows_icon_generator_test.mocks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,13 @@ class MockWindowsConfig extends _i1.Mock implements _i5.WindowsConfig {
) as bool);

@override
Map<dynamic, dynamic> toJson() => (super.noSuchMethod(
Map<String, dynamic> toJson() => (super.noSuchMethod(
Invocation.method(
#toJson,
[],
),
returnValue: <dynamic, dynamic>{},
) as Map<dynamic, dynamic>);
) as Map<String, dynamic>);
}

/// A class which mocks [FLILogger].
Expand Down

0 comments on commit b01f601

Please sign in to comment.