Updated deprecated widgets with new one (#689)

pull/700/head
Adarsh kumar singh 5 years ago committed by GitHub
parent 323c10558d
commit d4f4065a6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -34,9 +34,7 @@ class _HomePageState extends State<HomePage> {
appBar: AppBar(
title: Text('Federated Plugin Demo'),
),
body: Builder(
builder: (context) {
return Center(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@ -56,7 +54,7 @@ class _HomePageState extends State<HomePage> {
batteryLevel = result;
});
} catch (error) {
Scaffold.of(context).showSnackBar(
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
backgroundColor: Theme.of(context).primaryColor,
content: Text(error.message as String),
@ -67,8 +65,6 @@ class _HomePageState extends State<HomePage> {
),
],
),
);
},
),
);
}

@ -212,4 +212,4 @@ packages:
version: "2.1.0-nullsafety.5"
sdks:
dart: ">=2.12.0-0.0 <3.0.0"
flutter: ">=1.20.0 <2.0.0"
flutter: ">=1.20.0"

@ -198,4 +198,4 @@ packages:
version: "2.1.0-nullsafety.5"
sdks:
dart: ">=2.12.0-0.0 <3.0.0"
flutter: ">=1.20.0 <2.0.0"
flutter: ">=1.20.0"

Loading…
Cancel
Save