Skip to content

Migrate to null safety (alternative pull request) #7

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

Merged
merged 2 commits into from
Jun 15, 2021
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [2.0.0]

- Migrated to null safety

## [1.2.0]

- Changed blob generator logic
Expand Down
4 changes: 2 additions & 2 deletions example/lib/common/app_shell.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'package:flutter/material.dart';

class AppShell extends StatelessWidget {
final String title;
final Widget child;
const AppShell({Key key, this.title, this.child}) : super(key: key);
final Widget? child;
const AppShell({Key? key, required this.title, this.child}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions example/lib/common/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'package:flutter/material.dart';

class Button extends StatelessWidget {
final String label;
final Function onTap;
const Button(this.label, {Key key, this.onTap}) : super(key: key);
final VoidCallback? onTap;
const Button(this.label, {Key? key, this.onTap}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/animated/animated_basic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import '../../common/app_shell.dart';
import '../../common/button.dart';

class AnimatedBasicExample extends StatelessWidget {
const AnimatedBasicExample({Key key}) : super(key: key);
const AnimatedBasicExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/animated/animated_child.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../../common/app_shell.dart';
import '../../common/button.dart';

class AnimatedChildExample extends StatelessWidget {
const AnimatedChildExample({Key key}) : super(key: key);
const AnimatedChildExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/animated/animated_color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../../common/button.dart';
import 'package:flutter/material.dart';

class AnimatedColorExample extends StatelessWidget {
const AnimatedColorExample({Key key}) : super(key: key);
const AnimatedColorExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/animated/animated_debug.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../../common/button.dart';
import 'package:flutter/material.dart';

class AnimatedDebugExample extends StatelessWidget {
const AnimatedDebugExample({Key key}) : super(key: key);
const AnimatedDebugExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/animated/animated_gradient.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../../common/button.dart';
import 'package:flutter/material.dart';

class AnimatedGradientExample extends StatelessWidget {
const AnimatedGradientExample({Key key}) : super(key: key);
const AnimatedGradientExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/animated/animated_hash.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../../common/button.dart';
import 'package:flutter/material.dart';

class AnimatedHashExample extends StatelessWidget {
const AnimatedHashExample({Key key}) : super(key: key);
const AnimatedHashExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions example/lib/examples/animated/animated_multiple_hash.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import '../../common/app_shell.dart';
import 'package:flutter/material.dart';

class AnimatedMultipleHashExample extends StatefulWidget {
const AnimatedMultipleHashExample({Key key}) : super(key: key);
const AnimatedMultipleHashExample({Key? key}) : super(key: key);

@override
_AnimatedMultipleHashExampleState createState() =>
Expand All @@ -12,7 +12,7 @@ class AnimatedMultipleHashExample extends StatefulWidget {

class _AnimatedMultipleHashExampleState
extends State<AnimatedMultipleHashExample> {
Color clr;
Color? clr;
@override
Widget build(BuildContext context) {
BlobController blobCtrl = BlobController();
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/animated/animated_stroke.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../../common/button.dart';
import 'package:flutter/material.dart';

class AnimatedStrokeExample extends StatelessWidget {
const AnimatedStrokeExample({Key key}) : super(key: key);
const AnimatedStrokeExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/animated/annimated_loop.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import '../../common/app_shell.dart';
import 'package:flutter/material.dart';

class AnimatedLoopExample extends StatelessWidget {
const AnimatedLoopExample({Key key}) : super(key: key);
const AnimatedLoopExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/examples.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import 'inspirations/frame.dart';
import 'inspirations/bottomclip.dart';

class Examples extends StatelessWidget {
const Examples({Key key}) : super(key: key);
const Examples({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions example/lib/examples/inspirations/bottomclip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import '../../common/app_shell.dart';
import 'package:flutter/material.dart';

class BottomClipInspirationExample extends StatelessWidget {
const BottomClipInspirationExample({Key key}) : super(key: key);
const BottomClipInspirationExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -52,7 +52,7 @@ class MyClipper extends CustomClipper<Path> {

var sqPath = Path()
..addRect(Rect.fromLTWH(0, 0, size.width, size.height / 2));
var blobPath = connectPoints(blobData.curves);
var blobPath = connectPoints(blobData.curves!);

return Path.combine(PathOperation.union, blobPath, sqPath);
}
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/inspirations/frame.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import '../../common/app_shell.dart';
import 'package:flutter/material.dart';

class FrameInspirationExample extends StatelessWidget {
const FrameInspirationExample({Key key}) : super(key: key);
const FrameInspirationExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
6 changes: 3 additions & 3 deletions example/lib/examples/inspirations/rotate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:flutter/material.dart';
import '../../common/app_shell.dart';

class RotateInpirationExample extends StatefulWidget {
const RotateInpirationExample({Key key}) : super(key: key);
const RotateInpirationExample({Key? key}) : super(key: key);

@override
_RotateInpirationExampleState createState() =>
Expand All @@ -13,8 +13,8 @@ class RotateInpirationExample extends StatefulWidget {

class _RotateInpirationExampleState extends State<RotateInpirationExample>
with SingleTickerProviderStateMixin {
AnimationController _animationController;
Animation animation;
late AnimationController _animationController;
late Animation animation;

@override
void initState() {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/static/static_basic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import '../../common/app_shell.dart';
import 'package:flutter/material.dart';

class StaticBasicExample extends StatelessWidget {
const StaticBasicExample({Key key}) : super(key: key);
const StaticBasicExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/static/static_child.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../../common/button.dart';
import 'package:flutter/material.dart';

class StaticChildExample extends StatelessWidget {
const StaticChildExample({Key key}) : super(key: key);
const StaticChildExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/static/static_clipper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../../common/button.dart';
import 'package:flutter/material.dart';

class StaticClipperExample extends StatefulWidget {
const StaticClipperExample({Key key}) : super(key: key);
const StaticClipperExample({Key? key}) : super(key: key);

@override
_StaticClipperExampleState createState() => _StaticClipperExampleState();
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/static/static_color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import '../../common/app_shell.dart';
import 'package:flutter/material.dart';

class StaticColorExample extends StatelessWidget {
const StaticColorExample({Key key}) : super(key: key);
const StaticColorExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/static/static_debug.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import '../../common/app_shell.dart';
import 'package:flutter/material.dart';

class StaticDebugExample extends StatelessWidget {
const StaticDebugExample({Key key}) : super(key: key);
const StaticDebugExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/static/static_gradient.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import '../../common/app_shell.dart';
import 'package:flutter/material.dart';

class StaticGradientExample extends StatelessWidget {
const StaticGradientExample({Key key}) : super(key: key);
const StaticGradientExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/static/static_hash.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../../common/button.dart';
import 'package:flutter/material.dart';

class StaticHashExample extends StatelessWidget {
const StaticHashExample({Key key}) : super(key: key);
const StaticHashExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/static/static_multiple_hash.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../../common/button.dart';
import 'package:flutter/material.dart';

class StaticMultipleHashExample extends StatelessWidget {
const StaticMultipleHashExample({Key key}) : super(key: key);
const StaticMultipleHashExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/examples/static/static_stroke.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import '../../common/app_shell.dart';
import 'package:flutter/material.dart';

class StaticStrokeExample extends StatelessWidget {
const StaticStrokeExample({Key key}) : super(key: key);
const StaticStrokeExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget {
}

class BasicExample extends StatelessWidget {
const BasicExample({Key key}) : super(key: key);
const BasicExample({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
Expand Down
Loading