diff --git a/lib/src/Model/features.g.dart b/lib/src/Model/features.g.dart index 9af406a..7f12c7c 100644 --- a/lib/src/Model/features.g.dart +++ b/lib/src/Model/features.g.dart @@ -2,65 +2,6 @@ part of 'features.dart'; -// ************************************************************************** -// EnhancedEnumGenerator -// ************************************************************************** - -extension GBFeatureSourceFromStringExtension on Iterable { - GBFeatureSource? fromString(String val) { - final override = { - 'unknownFeature': GBFeatureSource.unknownFeature, - 'defaultValue': GBFeatureSource.defaultValue, - 'force': GBFeatureSource.force, - 'experiment': GBFeatureSource.experiment, - }[val]; -// ignore: unnecessary_this - return this.contains(override) ? override : null; - } -} - -extension GBFeatureSourceEnhancedEnum on GBFeatureSource { - @override -// ignore: override_on_non_overriding_member - String get name => { - GBFeatureSource.unknownFeature: 'unknownFeature', - GBFeatureSource.defaultValue: 'defaultValue', - GBFeatureSource.force: 'force', - GBFeatureSource.experiment: 'experiment', - }[this]!; - bool get isUnknownFeature => this == GBFeatureSource.unknownFeature; - bool get isDefaultValue => this == GBFeatureSource.defaultValue; - bool get isForce => this == GBFeatureSource.force; - bool get isExperiment => this == GBFeatureSource.experiment; - T when({ - required T Function() unknownFeature, - required T Function() defaultValue, - required T Function() force, - required T Function() experiment, - }) => - { - GBFeatureSource.unknownFeature: unknownFeature, - GBFeatureSource.defaultValue: defaultValue, - GBFeatureSource.force: force, - GBFeatureSource.experiment: experiment, - }[this]!(); - T maybeWhen({ - T? Function()? unknownFeature, - T? Function()? defaultValue, - T? Function()? force, - T? Function()? experiment, - required T Function() orElse, - }) => - { - GBFeatureSource.unknownFeature: unknownFeature, - GBFeatureSource.defaultValue: defaultValue, - GBFeatureSource.force: force, - GBFeatureSource.experiment: experiment, - }[this] - ?.call() ?? - orElse(); -} - // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** diff --git a/pubspec.lock b/pubspec.lock index 7421ecc..7d040ed 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "31.0.0" + version: "46.0.0" analyzer: - dependency: transitive + dependency: "direct dev" description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "2.8.0" + version: "4.6.0" args: dependency: transitive description: @@ -63,7 +63,7 @@ packages: name: build_resolvers url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.9" build_runner: dependency: "direct dev" description: @@ -113,13 +113,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" - cli_util: - dependency: transitive - description: - name: cli_util - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.5" clock: dependency: transitive description: @@ -161,7 +154,7 @@ packages: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "2.2.1" + version: "2.2.3" dio: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 4f94b6f..415ad4f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -21,4 +21,5 @@ dev_dependencies: sdk: flutter flutter_lints: ^1.0.0 build_runner: ^2.1.11 + analyzer: ^4.6.0