Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #301 add implicit_dynamic_list_literal to generated files #303

Merged
merged 3 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions example/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ analyzer:
exclude:
- "**/*.g.dart"
- "**/*.freezed.dart"
strong-mode:
implicit-casts: false
implicit-dynamic: false

linter:
rules:
Expand Down
Binary file added example/assets/mix/aaa.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
1 change: 1 addition & 0 deletions example/assets/mix/unknown_mime_type.bk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file is UNKNOWN MIME TYPE FILE.
16 changes: 15 additions & 1 deletion example/lib/gen/assets.gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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<dynamic> get values => [aaa, unknownMimeType];
}

class $AssetsMovieGen {
const $AssetsMovieGen();

Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion example/lib/gen/colors.gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion example/lib/gen/fonts.gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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._();
Expand Down
1 change: 1 addition & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ flutter:
- assets/lottie/wrong/
- assets/movie/
- assets/unknown/
- assets/mix/
fonts:
- family: Raleway
fonts:
Expand Down
2 changes: 1 addition & 1 deletion packages/core/lib/generators/generator_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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

''';
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test_resources/actual_data/assets.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/core/test_resources/actual_data/colors.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/core/test_resources/actual_data/fonts.gen.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.