Unverified Commit 35c9dec2 authored by Abhishek Ghaskata's avatar Abhishek Ghaskata Committed by GitHub

MIgrate ios_platform_view_tests to null safety (#80619)

parent 013dc3dd
...@@ -12,7 +12,7 @@ void main() { ...@@ -12,7 +12,7 @@ void main() {
/// The main app entrance of the test /// The main app entrance of the test
class MyApp extends StatelessWidget { class MyApp extends StatelessWidget {
const MyApp({Key key}) : super(key: key); const MyApp({Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -30,8 +30,8 @@ class MyApp extends StatelessWidget { ...@@ -30,8 +30,8 @@ class MyApp extends StatelessWidget {
/// ///
/// On press the button, a page with platform view should be pushed into the scene. /// On press the button, a page with platform view should be pushed into the scene.
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: Column(children: <Widget>[ body: Column(children: <Widget>[
TextButton( TextButton(
...@@ -69,7 +69,7 @@ class _MyHomePageState extends State<MyHomePage> { ...@@ -69,7 +69,7 @@ class _MyHomePageState extends State<MyHomePage> {
/// A page contains the platform view to be tested. /// A page contains the platform view to be tested.
class PlatformViewPage extends StatelessWidget { 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'); static Key button = const ValueKey<String>('plus_button');
......
...@@ -3,7 +3,7 @@ name: ios_platform_view_tests ...@@ -3,7 +3,7 @@ name: ios_platform_view_tests
version: 1.0.0+1 version: 1.0.0+1
environment: environment:
sdk: ">=2.1.0 <3.0.0" sdk: ">=2.12.0 <3.0.0"
dependencies: dependencies:
flutter: flutter:
......
...@@ -8,7 +8,7 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf; ...@@ -8,7 +8,7 @@ import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
void main() { void main() {
group('FlutterDriver', () { group('FlutterDriver', () {
FlutterDriver driver; late FlutterDriver driver;
setUpAll(() async { setUpAll(() async {
driver = await FlutterDriver.connect(); driver = await FlutterDriver.connect();
......
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