Unverified Commit c3a15bf9 authored by Abhishek Ghaskata's avatar Abhishek Ghaskata Committed by GitHub

Migrate the ios_app_with_extensions to null safety (#80485)

parent e197a96f
......@@ -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<MyHomePage> {
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
......
......@@ -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:
......
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