Unverified Commit 3cb5942e authored by Abhishek Ghaskata's avatar Abhishek Ghaskata Committed by GitHub

Update abstract_method_smoke_test to null safety (#80555)

parent a0f7694d
...@@ -14,7 +14,7 @@ Future<void> main() async { ...@@ -14,7 +14,7 @@ Future<void> main() async {
} }
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) {
...@@ -29,7 +29,7 @@ class MyApp extends StatelessWidget { ...@@ -29,7 +29,7 @@ class MyApp extends StatelessWidget {
} }
class HomePage extends StatefulWidget { class HomePage extends StatefulWidget {
const HomePage({Key key}) : super(key: key); const HomePage({Key? key}) : super(key: key);
@override @override
_HomePage createState() => _HomePage(); _HomePage createState() => _HomePage();
...@@ -42,7 +42,7 @@ class _HomePage extends State<HomePage> { ...@@ -42,7 +42,7 @@ class _HomePage extends State<HomePage> {
// Trigger the second route. // Trigger the second route.
// https://github.com/flutter/flutter/issues/40126 // https://github.com/flutter/flutter/issues/40126
WidgetsBinding.instance.addPostFrameCallback((_) async { WidgetsBinding.instance?.addPostFrameCallback((_) async {
Navigator.of(context).push( Navigator.of(context).push(
MaterialPageRoute<void>(builder: (_) => const SecondPage())); MaterialPageRoute<void>(builder: (_) => const SecondPage()));
}); });
...@@ -55,7 +55,7 @@ class _HomePage extends State<HomePage> { ...@@ -55,7 +55,7 @@ class _HomePage extends State<HomePage> {
} }
class SecondPage extends StatelessWidget { class SecondPage extends StatelessWidget {
const SecondPage({Key key}) : super(key: key); const SecondPage({Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
......
...@@ -4,7 +4,7 @@ description: A new Flutter project. ...@@ -4,7 +4,7 @@ description: A new Flutter project.
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:
......
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