Migrate remaining examples to null-safety (#74857)
This commit is contained in:
committed by
GitHub
parent
c505ee79de
commit
06f051b2d5
@@ -25,7 +25,7 @@ class PlatformView extends StatelessWidget {
|
||||
}
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
const MyHomePage({Key key, this.title}) : super(key: key);
|
||||
const MyHomePage({Key? key, required this.title}) : super(key: key);
|
||||
|
||||
final String title;
|
||||
|
||||
@@ -46,10 +46,10 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
}
|
||||
|
||||
Future<void> _launchPlatformCount() async {
|
||||
final int platformCounter =
|
||||
final int? platformCounter =
|
||||
await _methodChannel.invokeMethod('switchView', _counter);
|
||||
setState(() {
|
||||
_counter = platformCounter;
|
||||
_counter = platformCounter!;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: platform_view
|
||||
|
||||
environment:
|
||||
sdk: ">=2.0.0-dev.68.0 <3.0.0"
|
||||
sdk: ">=2.12.0-0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
flutter:
|
||||
|
||||
Reference in New Issue
Block a user