Skip to content

Commit 91c152e

Browse files
authored
Migrate to Null-Safety (#91)
* refactor(nnbd): migrate to null-safety * refactor(deps): remove merge_map package * refactor(deps): remove color package * chore(format): fix format * feat(cli): support option of --no-sound-null-safety * refactor(integration): add name of params * refactor(nndb): add option for pubspec.yaml * refactor(cli): remove unused var * refactor(*): copy from dart_style * refactor(*): refactor * refactor(plugin): remove color libs * refactor(plugin): remove color libs * chore(deps): update deps * chore(deps): update deps * chore(analyze): fix analyze points * chore(deps): add collection * docs(changelog): update * chore(*): update deps * chore(*): bump up 3.0.1 * chore(*): bump up 3.0.1 * chore(deps): update deps * chore(deps): update deps in sample
1 parent abf1e53 commit 91c152e

File tree

85 files changed

+11536
-650
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+11536
-650
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 3.0.0, 3.0.1
2+
3+
- Support Null Safety
4+
```yaml
5+
flutter_gen:
6+
output: lib/gen/
7+
line_length: 80
8+
null_safety: true # Optional (default: true)
9+
```
10+
111
## 2.0.1, 2.0.2, 2.0.3
212
313
- Update dependencies

codecov.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ coverage:
2222

2323
ignore:
2424
- "example/"
25+
- "**/*.g.dart"
2526
- "**/*.gen.dart"
27+
- "package/core/lib/utils/dart_style"

example/.dart_tool/build/entrypoint/build.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// ignore_for_file: directives_ordering
77

88
import 'package:build_runner_core/build_runner_core.dart' as _i1;
9-
import 'package:flutter_gen_runner/build.dart' as _i2;
9+
import 'package:flutter_gen_runner/flutter_gen_runner.dart' as _i2;
1010
import 'dart:isolate' as _i3;
1111
import 'package:build_runner/build_runner.dart' as _i4;
1212
import 'dart:io' as _i5;

example/lib/gen/assets.gen.dart

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @dart = 2.10
21
/// GENERATED CODE - DO NOT MODIFY BY HAND
32
/// *****************************************************
43
/// FlutterGen
@@ -98,20 +97,20 @@ class AssetGenImage extends AssetImage {
9897
final String _assetName;
9998

10099
Image image({
101-
Key key,
102-
ImageFrameBuilder frameBuilder,
103-
ImageLoadingBuilder loadingBuilder,
104-
ImageErrorWidgetBuilder errorBuilder,
105-
String semanticLabel,
100+
Key? key,
101+
ImageFrameBuilder? frameBuilder,
102+
ImageLoadingBuilder? loadingBuilder,
103+
ImageErrorWidgetBuilder? errorBuilder,
104+
String? semanticLabel,
106105
bool excludeFromSemantics = false,
107-
double width,
108-
double height,
109-
Color color,
110-
BlendMode colorBlendMode,
111-
BoxFit fit,
106+
double? width,
107+
double? height,
108+
Color? color,
109+
BlendMode? colorBlendMode,
110+
BoxFit? fit,
112111
AlignmentGeometry alignment = Alignment.center,
113112
ImageRepeat repeat = ImageRepeat.noRepeat,
114-
Rect centerSlice,
113+
Rect? centerSlice,
115114
bool matchTextDirection = false,
116115
bool gaplessPlayback = false,
117116
bool isAntiAlias = false,
@@ -149,19 +148,19 @@ class SvgGenImage {
149148
final String _assetName;
150149

151150
SvgPicture svg({
152-
Key key,
151+
Key? key,
153152
bool matchTextDirection = false,
154-
AssetBundle bundle,
155-
String package,
156-
double width,
157-
double height,
153+
AssetBundle? bundle,
154+
String? package,
155+
double? width,
156+
double? height,
158157
BoxFit fit = BoxFit.contain,
159158
AlignmentGeometry alignment = Alignment.center,
160159
bool allowDrawingOutsideViewBox = false,
161-
WidgetBuilder placeholderBuilder,
162-
Color color,
160+
WidgetBuilder? placeholderBuilder,
161+
Color? color,
163162
BlendMode colorBlendMode = BlendMode.srcIn,
164-
String semanticsLabel,
163+
String? semanticsLabel,
165164
bool excludeFromSemantics = false,
166165
Clip clipBehavior = Clip.hardEdge,
167166
}) {
@@ -194,18 +193,18 @@ class FlareGenImage {
194193
final String _assetName;
195194

196195
FlareActor flare({
197-
String boundsNode,
198-
String animation,
196+
String? boundsNode,
197+
String? animation,
199198
BoxFit fit = BoxFit.contain,
200199
Alignment alignment = Alignment.center,
201200
bool isPaused = false,
202201
bool snapToEnd = false,
203-
FlareController controller,
204-
FlareCompletedCallback callback,
205-
Color color,
202+
FlareController? controller,
203+
FlareCompletedCallback? callback,
204+
Color? color,
206205
bool shouldClip = true,
207206
bool sizeFromArtboard = false,
208-
String artboard,
207+
String? artboard,
209208
bool antialias = true,
210209
}) {
211210
return FlareActor(

example/lib/gen/colors.gen.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @dart = 2.10
21
/// GENERATED CODE - DO NOT MODIFY BY HAND
32
/// *****************************************************
43
/// FlutterGen

example/lib/gen/fonts.gen.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @dart = 2.10
21
/// GENERATED CODE - DO NOT MODIFY BY HAND
32
/// *****************************************************
43
/// FlutterGen

0 commit comments

Comments
 (0)