Skip to content

Commit a80810f

Browse files
authored
Merge pull request #7 from ryanheise/nnbd
Migrate to null safety (alternative pull request)
2 parents 61f448b + 31512bf commit a80810f

Some content is hidden

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

42 files changed

+267
-278
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [2.0.0]
2+
3+
- Migrated to null safety
4+
15
## [1.2.0]
26

37
- Changed blob generator logic

example/lib/common/app_shell.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
22

33
class AppShell extends StatelessWidget {
44
final String title;
5-
final Widget child;
6-
const AppShell({Key key, this.title, this.child}) : super(key: key);
5+
final Widget? child;
6+
const AppShell({Key? key, required this.title, this.child}) : super(key: key);
77

88
@override
99
Widget build(BuildContext context) {

example/lib/common/button.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
22

33
class Button extends StatelessWidget {
44
final String label;
5-
final Function onTap;
6-
const Button(this.label, {Key key, this.onTap}) : super(key: key);
5+
final VoidCallback? onTap;
6+
const Button(this.label, {Key? key, this.onTap}) : super(key: key);
77

88
@override
99
Widget build(BuildContext context) {

example/lib/examples/animated/animated_basic.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import '../../common/app_shell.dart';
55
import '../../common/button.dart';
66

77
class AnimatedBasicExample extends StatelessWidget {
8-
const AnimatedBasicExample({Key key}) : super(key: key);
8+
const AnimatedBasicExample({Key? key}) : super(key: key);
99

1010
@override
1111
Widget build(BuildContext context) {

example/lib/examples/animated/animated_child.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import '../../common/app_shell.dart';
44
import '../../common/button.dart';
55

66
class AnimatedChildExample extends StatelessWidget {
7-
const AnimatedChildExample({Key key}) : super(key: key);
7+
const AnimatedChildExample({Key? key}) : super(key: key);
88

99
@override
1010
Widget build(BuildContext context) {

example/lib/examples/animated/animated_color.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import '../../common/button.dart';
44
import 'package:flutter/material.dart';
55

66
class AnimatedColorExample extends StatelessWidget {
7-
const AnimatedColorExample({Key key}) : super(key: key);
7+
const AnimatedColorExample({Key? key}) : super(key: key);
88

99
@override
1010
Widget build(BuildContext context) {

example/lib/examples/animated/animated_debug.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import '../../common/button.dart';
44
import 'package:flutter/material.dart';
55

66
class AnimatedDebugExample extends StatelessWidget {
7-
const AnimatedDebugExample({Key key}) : super(key: key);
7+
const AnimatedDebugExample({Key? key}) : super(key: key);
88

99
@override
1010
Widget build(BuildContext context) {

example/lib/examples/animated/animated_gradient.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import '../../common/button.dart';
44
import 'package:flutter/material.dart';
55

66
class AnimatedGradientExample extends StatelessWidget {
7-
const AnimatedGradientExample({Key key}) : super(key: key);
7+
const AnimatedGradientExample({Key? key}) : super(key: key);
88

99
@override
1010
Widget build(BuildContext context) {

example/lib/examples/animated/animated_hash.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import '../../common/button.dart';
44
import 'package:flutter/material.dart';
55

66
class AnimatedHashExample extends StatelessWidget {
7-
const AnimatedHashExample({Key key}) : super(key: key);
7+
const AnimatedHashExample({Key? key}) : super(key: key);
88

99
@override
1010
Widget build(BuildContext context) {

example/lib/examples/animated/animated_multiple_hash.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import '../../common/app_shell.dart';
33
import 'package:flutter/material.dart';
44

55
class AnimatedMultipleHashExample extends StatefulWidget {
6-
const AnimatedMultipleHashExample({Key key}) : super(key: key);
6+
const AnimatedMultipleHashExample({Key? key}) : super(key: key);
77

88
@override
99
_AnimatedMultipleHashExampleState createState() =>
@@ -12,7 +12,7 @@ class AnimatedMultipleHashExample extends StatefulWidget {
1212

1313
class _AnimatedMultipleHashExampleState
1414
extends State<AnimatedMultipleHashExample> {
15-
Color clr;
15+
Color? clr;
1616
@override
1717
Widget build(BuildContext context) {
1818
BlobController blobCtrl = BlobController();

0 commit comments

Comments
 (0)