diff --git a/dev/integration_tests/ios_app_with_extensions/lib/main.dart b/dev/integration_tests/ios_app_with_extensions/lib/main.dart index 5ea5dcaf555..acf6ee73314 100644 --- a/dev/integration_tests/ios_app_with_extensions/lib/main.dart +++ b/dev/integration_tests/ios_app_with_extensions/lib/main.dart @@ -7,7 +7,7 @@ import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { - const MyApp({Key key}) : super(key: key); + const MyApp({Key? key}) : super(key: key); // This widget is the root of your application. @override @@ -32,7 +32,7 @@ class MyApp extends StatelessWidget { } class MyHomePage extends StatefulWidget { - const MyHomePage({Key key, this.title}) : super(key: key); + const MyHomePage({Key? key, this.title}) : super(key: key); // This widget is the home page of your application. It is stateful, meaning // that it has a State object (defined below) that contains fields that affect @@ -43,7 +43,7 @@ class MyHomePage extends StatefulWidget { // used by the build method of the State. Fields in a Widget subclass are // always marked "final". - final String title; + final String? title; @override _MyHomePageState createState() => _MyHomePageState(); @@ -75,7 +75,7 @@ class _MyHomePageState extends State { appBar: AppBar( // Here we take the value from the MyHomePage object that was created by // the App.build method, and use it to set our appbar title. - title: Text(widget.title), + title: Text(widget.title ?? ''), ), body: Center( // Center is a layout widget. It takes a single child and positions it diff --git a/dev/integration_tests/ios_app_with_extensions/pubspec.yaml b/dev/integration_tests/ios_app_with_extensions/pubspec.yaml index f14d5888bb9..da38c615830 100644 --- a/dev/integration_tests/ios_app_with_extensions/pubspec.yaml +++ b/dev/integration_tests/ios_app_with_extensions/pubspec.yaml @@ -13,7 +13,7 @@ name: ios_app_with_extensions version: 1.0.0+1 environment: - sdk: ">=2.1.0 <3.0.0" + sdk: ">=2.12.0 <3.0.0" dependencies: flutter: