diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml index 06be34a8..9a22e18b 100644 --- a/example/analysis_options.yaml +++ b/example/analysis_options.yaml @@ -4,6 +4,9 @@ analyzer: exclude: - "**/*.g.dart" - "**/*.freezed.dart" + strong-mode: + implicit-casts: false + implicit-dynamic: false linter: rules: diff --git a/example/assets/mix/aaa.jpg b/example/assets/mix/aaa.jpg new file mode 100644 index 00000000..3227e8a7 Binary files /dev/null and b/example/assets/mix/aaa.jpg differ diff --git a/example/assets/mix/dummy.DS_Store b/example/assets/mix/dummy.DS_Store new file mode 100644 index 00000000..e69de29b diff --git a/example/assets/mix/unknown_mime_type.bk b/example/assets/mix/unknown_mime_type.bk new file mode 100644 index 00000000..b5d54f7a --- /dev/null +++ b/example/assets/mix/unknown_mime_type.bk @@ -0,0 +1 @@ +This file is UNKNOWN MIME TYPE FILE. \ No newline at end of file diff --git a/example/lib/gen/assets.gen.dart b/example/lib/gen/assets.gen.dart index e9917b04..344dc9ff 100644 --- a/example/lib/gen/assets.gen.dart +++ b/example/lib/gen/assets.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/widgets.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -85,6 +85,19 @@ class $AssetsLottieGen { [alarmClockLottieV440, geometricalAnimation, hamburgerArrow]; } +class $AssetsMixGen { + const $AssetsMixGen(); + + /// File path: assets/mix/aaa.jpg + AssetGenImage get aaa => const AssetGenImage('assets/mix/aaa.jpg'); + + /// File path: assets/mix/unknown_mime_type.bk + String get unknownMimeType => 'assets/mix/unknown_mime_type.bk'; + + /// List of all assets + List get values => [aaa, unknownMimeType]; +} + class $AssetsMovieGen { const $AssetsMovieGen(); @@ -170,6 +183,7 @@ class MyAssets { static const $AssetsImagesGen images = $AssetsImagesGen(); static const $AssetsJsonGen json = $AssetsJsonGen(); static const $AssetsLottieGen lottie = $AssetsLottieGen(); + static const $AssetsMixGen mix = $AssetsMixGen(); static const $AssetsMovieGen movie = $AssetsMovieGen(); static const $AssetsRiveGen rive = $AssetsRiveGen(); static const $AssetsUnknownGen unknown = $AssetsUnknownGen(); diff --git a/example/lib/gen/colors.gen.dart b/example/lib/gen/colors.gen.dart index 8d4e9756..88adda80 100644 --- a/example/lib/gen/colors.gen.dart +++ b/example/lib/gen/colors.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/painting.dart'; import 'package:flutter/material.dart'; diff --git a/example/lib/gen/fonts.gen.dart b/example/lib/gen/fonts.gen.dart index e7fd2191..a67e7750 100644 --- a/example/lib/gen/fonts.gen.dart +++ b/example/lib/gen/fonts.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal class MyFontFamily { MyFontFamily._(); diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 62c19af8..9ffe32fd 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -174,6 +174,7 @@ flutter: - assets/lottie/wrong/ - assets/movie/ - assets/unknown/ + - assets/mix/ fonts: - family: Raleway fonts: diff --git a/packages/core/lib/generators/generator_helper.dart b/packages/core/lib/generators/generator_helper.dart index 9856dbd7..1f2f8262 100644 --- a/packages/core/lib/generators/generator_helper.dart +++ b/packages/core/lib/generators/generator_helper.dart @@ -10,7 +10,7 @@ String get header { String get ignore { return '''// coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal '''; } diff --git a/packages/core/test_resources/actual_data/assets.gen.dart b/packages/core/test_resources/actual_data/assets.gen.dart index 196c100d..bb5fe85d 100644 --- a/packages/core/test_resources/actual_data/assets.gen.dart +++ b/packages/core/test_resources/actual_data/assets.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/widgets.dart'; import 'package:flutter_svg/flutter_svg.dart'; diff --git a/packages/core/test_resources/actual_data/assets_camel_case.gen.dart b/packages/core/test_resources/actual_data/assets_camel_case.gen.dart index a7e93f1f..37bdf5c4 100644 --- a/packages/core/test_resources/actual_data/assets_camel_case.gen.dart +++ b/packages/core/test_resources/actual_data/assets_camel_case.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/widgets.dart'; diff --git a/packages/core/test_resources/actual_data/assets_change_class_name.gen.dart b/packages/core/test_resources/actual_data/assets_change_class_name.gen.dart index 20bbef43..039b4665 100644 --- a/packages/core/test_resources/actual_data/assets_change_class_name.gen.dart +++ b/packages/core/test_resources/actual_data/assets_change_class_name.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/widgets.dart'; diff --git a/packages/core/test_resources/actual_data/assets_flare_integrations.gen.dart b/packages/core/test_resources/actual_data/assets_flare_integrations.gen.dart index 570705e2..05522dbe 100644 --- a/packages/core/test_resources/actual_data/assets_flare_integrations.gen.dart +++ b/packages/core/test_resources/actual_data/assets_flare_integrations.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/widgets.dart'; import 'package:flare_flutter/flare_actor.dart'; diff --git a/packages/core/test_resources/actual_data/assets_ignore_files.gen.dart b/packages/core/test_resources/actual_data/assets_ignore_files.gen.dart index 72200111..30c0420a 100644 --- a/packages/core/test_resources/actual_data/assets_ignore_files.gen.dart +++ b/packages/core/test_resources/actual_data/assets_ignore_files.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/widgets.dart'; diff --git a/packages/core/test_resources/actual_data/assets_lottie_integrations.gen.dart b/packages/core/test_resources/actual_data/assets_lottie_integrations.gen.dart index 9a4e6b6d..8af148d9 100644 --- a/packages/core/test_resources/actual_data/assets_lottie_integrations.gen.dart +++ b/packages/core/test_resources/actual_data/assets_lottie_integrations.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/widgets.dart'; import 'package:lottie/lottie.dart'; diff --git a/packages/core/test_resources/actual_data/assets_no_integrations.gen.dart b/packages/core/test_resources/actual_data/assets_no_integrations.gen.dart index 2b8397cf..8e06f5c9 100644 --- a/packages/core/test_resources/actual_data/assets_no_integrations.gen.dart +++ b/packages/core/test_resources/actual_data/assets_no_integrations.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/widgets.dart'; diff --git a/packages/core/test_resources/actual_data/assets_package_exclude_files.gen.dart b/packages/core/test_resources/actual_data/assets_package_exclude_files.gen.dart index 9338336f..bfcfe879 100644 --- a/packages/core/test_resources/actual_data/assets_package_exclude_files.gen.dart +++ b/packages/core/test_resources/actual_data/assets_package_exclude_files.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/widgets.dart'; diff --git a/packages/core/test_resources/actual_data/assets_package_parameter.gen.dart b/packages/core/test_resources/actual_data/assets_package_parameter.gen.dart index ca03bfc0..57452147 100644 --- a/packages/core/test_resources/actual_data/assets_package_parameter.gen.dart +++ b/packages/core/test_resources/actual_data/assets_package_parameter.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/widgets.dart'; import 'package:flutter_svg/flutter_svg.dart'; diff --git a/packages/core/test_resources/actual_data/assets_rive_integrations.gen.dart b/packages/core/test_resources/actual_data/assets_rive_integrations.gen.dart index 67197dba..d4543701 100644 --- a/packages/core/test_resources/actual_data/assets_rive_integrations.gen.dart +++ b/packages/core/test_resources/actual_data/assets_rive_integrations.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/widgets.dart'; import 'package:rive/rive.dart'; diff --git a/packages/core/test_resources/actual_data/assets_snake_case.gen.dart b/packages/core/test_resources/actual_data/assets_snake_case.gen.dart index b3affd33..6e6f19d2 100644 --- a/packages/core/test_resources/actual_data/assets_snake_case.gen.dart +++ b/packages/core/test_resources/actual_data/assets_snake_case.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/widgets.dart'; diff --git a/packages/core/test_resources/actual_data/assets_svg_integrations.gen.dart b/packages/core/test_resources/actual_data/assets_svg_integrations.gen.dart index ed6db735..d0181ad2 100644 --- a/packages/core/test_resources/actual_data/assets_svg_integrations.gen.dart +++ b/packages/core/test_resources/actual_data/assets_svg_integrations.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/widgets.dart'; import 'package:flutter_svg/flutter_svg.dart'; diff --git a/packages/core/test_resources/actual_data/assets_unknown_mime_type.gen.dart b/packages/core/test_resources/actual_data/assets_unknown_mime_type.gen.dart index 45e235cd..e3f61f83 100644 --- a/packages/core/test_resources/actual_data/assets_unknown_mime_type.gen.dart +++ b/packages/core/test_resources/actual_data/assets_unknown_mime_type.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/widgets.dart'; diff --git a/packages/core/test_resources/actual_data/colors.gen.dart b/packages/core/test_resources/actual_data/colors.gen.dart index 530b11c8..26101023 100644 --- a/packages/core/test_resources/actual_data/colors.gen.dart +++ b/packages/core/test_resources/actual_data/colors.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/painting.dart'; import 'package:flutter/material.dart'; diff --git a/packages/core/test_resources/actual_data/colors_change_class_name.gen.dart b/packages/core/test_resources/actual_data/colors_change_class_name.gen.dart index c47f7cae..a6d51bae 100644 --- a/packages/core/test_resources/actual_data/colors_change_class_name.gen.dart +++ b/packages/core/test_resources/actual_data/colors_change_class_name.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal import 'package:flutter/painting.dart'; import 'package:flutter/material.dart'; diff --git a/packages/core/test_resources/actual_data/fonts.gen.dart b/packages/core/test_resources/actual_data/fonts.gen.dart index 9c088f07..d708ff9a 100644 --- a/packages/core/test_resources/actual_data/fonts.gen.dart +++ b/packages/core/test_resources/actual_data/fonts.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal class FontFamily { FontFamily._(); diff --git a/packages/core/test_resources/actual_data/fonts_change_class_name.gen.dart b/packages/core/test_resources/actual_data/fonts_change_class_name.gen.dart index d9606a9f..0e686c62 100644 --- a/packages/core/test_resources/actual_data/fonts_change_class_name.gen.dart +++ b/packages/core/test_resources/actual_data/fonts_change_class_name.gen.dart @@ -5,7 +5,7 @@ // coverage:ignore-file // ignore_for_file: type=lint -// ignore_for_file: directives_ordering,unnecessary_import +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal class MyFontFamily { MyFontFamily._();