diff --git a/dev/benchmarks/multiple_flutters/module/lib/main.dart b/dev/benchmarks/multiple_flutters/module/lib/main.dart index 878c5bbd3ae..472e599fe50 100644 --- a/dev/benchmarks/multiple_flutters/module/lib/main.dart +++ b/dev/benchmarks/multiple_flutters/module/lib/main.dart @@ -13,7 +13,7 @@ void topMain() => runApp(const MyApp(Colors.green)); void bottomMain() => runApp(const MyApp(Colors.purple)); 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; @@ -30,8 +30,8 @@ class MyApp extends StatelessWidget { } class MyHomePage extends StatefulWidget { - const MyHomePage({Key key, this.title}) : super(key: key); - final String title; + const MyHomePage({Key? key, this.title}) : super(key: key); + final String? title; @override _MyHomePageState createState() => _MyHomePageState(); @@ -42,7 +42,7 @@ class _MyHomePageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text(widget.title), + title: Text(widget.title ?? ''), ), body: Center( child: Column( diff --git a/dev/benchmarks/multiple_flutters/module/pubspec.yaml b/dev/benchmarks/multiple_flutters/module/pubspec.yaml index 81753009857..05a2f89f3d3 100644 --- a/dev/benchmarks/multiple_flutters/module/pubspec.yaml +++ b/dev/benchmarks/multiple_flutters/module/pubspec.yaml @@ -4,7 +4,7 @@ description: A module that is embedded in the multiple_flutters benchmark test. version: 1.0.0+1 environment: - sdk: '>=2.8.1 <3.0.0' + sdk: '>=2.12.0 <3.0.0' dependencies: flutter: