Unverified Commit 347b9f4d authored by Abhishek Ghaskata's avatar Abhishek Ghaskata Committed by GitHub

Migrate multiple_flutters to null safety (#80630)

parent 0de20a33
...@@ -13,7 +13,7 @@ void topMain() => runApp(const MyApp(Colors.green)); ...@@ -13,7 +13,7 @@ void topMain() => runApp(const MyApp(Colors.green));
void bottomMain() => runApp(const MyApp(Colors.purple)); void bottomMain() => runApp(const MyApp(Colors.purple));
class MyApp extends StatelessWidget { class MyApp extends StatelessWidget {
const MyApp(this.color, {Key key}) : super(key: key); const MyApp(this.color, {Key? key}) : super(key: key);
final Color color; final Color color;
...@@ -30,8 +30,8 @@ class MyApp extends StatelessWidget { ...@@ -30,8 +30,8 @@ class MyApp extends StatelessWidget {
} }
class MyHomePage extends StatefulWidget { class MyHomePage extends StatefulWidget {
const MyHomePage({Key key, this.title}) : super(key: key); const MyHomePage({Key? key, this.title}) : super(key: key);
final String title; final String? title;
@override @override
_MyHomePageState createState() => _MyHomePageState(); _MyHomePageState createState() => _MyHomePageState();
...@@ -42,7 +42,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -42,7 +42,7 @@ class _MyHomePageState extends State<MyHomePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
title: Text(widget.title), title: Text(widget.title ?? ''),
), ),
body: Center( body: Center(
child: Column( child: Column(
......
...@@ -4,7 +4,7 @@ description: A module that is embedded in the multiple_flutters benchmark test. ...@@ -4,7 +4,7 @@ description: A module that is embedded in the multiple_flutters benchmark test.
version: 1.0.0+1 version: 1.0.0+1
environment: environment:
sdk: '>=2.8.1 <3.0.0' sdk: '>=2.12.0 <3.0.0'
dependencies: dependencies:
flutter: flutter:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment