MIgrate ios_platform_view_tests to null safety (#80619)

This commit is contained in:
Abhishek Ghaskata
2021-04-21 04:24:03 +05:30
committed by GitHub
parent 013dc3dd7c
commit 35c9dec2a1
3 changed files with 7 additions and 7 deletions

View File

@@ -12,7 +12,7 @@ void main() {
/// The main app entrance of the test
class MyApp extends StatelessWidget {
const MyApp({Key key}) : super(key: key);
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
@@ -30,8 +30,8 @@ class MyApp extends StatelessWidget {
///
/// On press the button, a page with platform view should be pushed into the scene.
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<MyHomePage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
title: Text(widget.title ?? ''),
),
body: Column(children: <Widget>[
TextButton(
@@ -69,7 +69,7 @@ class _MyHomePageState extends State<MyHomePage> {
/// A page contains the platform view to be tested.
class PlatformViewPage extends StatelessWidget {
const PlatformViewPage({Key key}) : super(key: key);
const PlatformViewPage({Key? key}) : super(key: key);
static Key button = const ValueKey<String>('plus_button');