Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e16b22

Browse files
committed
Migrate to null safety
This commit is Copyright (C) 2021 The Boston Consulting Group Pty Ltd
1 parent 0baad80 commit 9e16b22

Some content is hidden

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

41 files changed

+261
-276
lines changed

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();

example/lib/examples/animated/animated_stroke.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 AnimatedStrokeExample extends StatelessWidget {
7-
const AnimatedStrokeExample({Key key}) : super(key: key);
7+
const AnimatedStrokeExample({Key? key}) : super(key: key);
88

99
@override
1010
Widget build(BuildContext context) {

0 commit comments

Comments
 (0)