diff --git a/.gitignore b/.gitignore index 1985397..ff0ea26 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ # Flutter/Dart/Pub related **/doc/api/ .dart_tool/ +.fvm/ .flutter-plugins .flutter-plugins-dependencies .packages diff --git a/example/pubspec.lock b/example/pubspec.lock index 9550714..cd9cf2d 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.8.1" boolean_selector: dependency: transitive description: @@ -28,7 +28,7 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -73,14 +73,14 @@ packages: name: gato url: "https://pub.dartlang.org" source: hosted - version: "0.0.4" + version: "0.0.5" global_configs: dependency: "direct main" description: path: ".." relative: true source: path - version: "1.1.1" + version: "1.1.2" matcher: dependency: transitive description: @@ -94,7 +94,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: @@ -113,7 +113,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" stack_trace: dependency: transitive description: @@ -148,7 +148,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.4.2" typed_data: dependency: transitive description: diff --git a/lib/global_configs.dart b/lib/global_configs.dart index e6a76a1..420f3ba 100644 --- a/lib/global_configs.dart +++ b/lib/global_configs.dart @@ -63,7 +63,7 @@ class GlobalConfigs { /// GlobalConfigs().get('a'); // 1 /// GlobalConfigs().get('b.c'); // 2 /// ```dart - T get(String path, {T Function(dynamic)? converter}) => + T? get(String path, {T Function(dynamic)? converter}) => gato.get(configs, path, converter: converter); /// Sets new data to the configs diff --git a/pubspec.lock b/pubspec.lock index 8d92cfa..501e2a2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.8.1" boolean_selector: dependency: transitive description: @@ -28,7 +28,7 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -66,7 +66,7 @@ packages: name: gato url: "https://pub.dartlang.org" source: hosted - version: "0.0.4" + version: "0.0.5" matcher: dependency: transitive description: @@ -80,7 +80,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: @@ -99,7 +99,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" stack_trace: dependency: transitive description: @@ -134,7 +134,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.4.2" typed_data: dependency: transitive description: diff --git a/test/global_configs_test.dart b/test/global_configs_test.dart index e53daa2..9a5f2b7 100644 --- a/test/global_configs_test.dart +++ b/test/global_configs_test.dart @@ -50,7 +50,7 @@ void main() { GlobalConfigs().clear(); GlobalConfigs().loadFromMap({'color': '0xFFB74093'}); - Color color = GlobalConfigs().get( + Color? color = GlobalConfigs().get( 'color', converter: (value) => Color(int.parse(value)), );