Skip to content

Commit 848151c

Browse files
fixed dart format changes. (#62)
1 parent 768ba95 commit 848151c

File tree

7 files changed

+339
-311
lines changed

7 files changed

+339
-311
lines changed

google_api_availability/example/lib/main.dart

+59-55
Original file line numberDiff line numberDiff line change
@@ -129,64 +129,68 @@ class _MyAppState extends State<MyApp> {
129129
Widget build(BuildContext context) {
130130
return MaterialApp(
131131
home: Scaffold(
132-
appBar: AppBar(
133-
title: const Text('Plugin example app'),
134-
),
135-
body: ListView(
136-
children: <Widget>[
137-
MaterialButton(
138-
onPressed: () => checkPlayServices(),
139-
child: const Text('Get PlayServices availability'),
140-
color: Colors.red,
132+
appBar: AppBar(title: const Text('Plugin example app')),
133+
body: ListView(
134+
children: <Widget>[
135+
MaterialButton(
136+
onPressed: () => checkPlayServices(),
137+
child: const Text('Get PlayServices availability'),
138+
color: Colors.red,
139+
),
140+
Center(
141+
child: Text(
142+
'Google Play Store status: ${_playStoreAvailability.toString().split('.').last}\n',
141143
),
142-
Center(
143-
child: Text(
144-
'Google Play Store status: ${_playStoreAvailability.toString().split('.').last}\n')),
145-
MaterialButton(
146-
onPressed: () => checkPlayServices(true),
147-
child:
148-
const Text('Get PlayServices availability with fix dialog'),
149-
color: Colors.redAccent,
144+
),
145+
MaterialButton(
146+
onPressed: () => checkPlayServices(true),
147+
child: const Text(
148+
'Get PlayServices availability with fix dialog',
150149
),
151-
Center(
152-
child: Text(
153-
'Google Play Store status: ${_playStoreAvailability.toString().split('.').last}\n')),
154-
MaterialButton(
155-
onPressed: () => makeGooglePlayServicesAvailable(),
156-
child: const Text('Make Google Play Service available'),
157-
color: Colors.red,
150+
color: Colors.redAccent,
151+
),
152+
Center(
153+
child: Text(
154+
'Google Play Store status: ${_playStoreAvailability.toString().split('.').last}\n',
158155
),
159-
const SizedBox(height: 30),
160-
MaterialButton(
161-
onPressed: () => getErrorString(),
162-
child: const Text('Get string of the error code'),
163-
color: Colors.red,
164-
),
165-
Center(child: Text('Error string: $_errorString\n')),
166-
MaterialButton(
167-
onPressed: () => isUserResolvable(),
168-
child: const Text('Error resolvable by user'),
169-
color: Colors.red,
170-
),
171-
Center(
172-
child:
173-
Text('Error resolvable by user: $_isUserResolvable\n')),
174-
MaterialButton(
175-
onPressed: () => showErrorNotification(),
176-
child: const Text('Show error notification'),
177-
color: Colors.red,
178-
),
179-
const SizedBox(height: 30),
180-
MaterialButton(
181-
onPressed: () => showErrorDialogFragment(),
182-
child: const Text('Show error dialog fragment'),
183-
color: Colors.red,
184-
),
185-
Center(
186-
child:
187-
Text('Error dialog shown: $_errorDialogFragmentShown\n')),
188-
],
189-
)),
156+
),
157+
MaterialButton(
158+
onPressed: () => makeGooglePlayServicesAvailable(),
159+
child: const Text('Make Google Play Service available'),
160+
color: Colors.red,
161+
),
162+
const SizedBox(height: 30),
163+
MaterialButton(
164+
onPressed: () => getErrorString(),
165+
child: const Text('Get string of the error code'),
166+
color: Colors.red,
167+
),
168+
Center(child: Text('Error string: $_errorString\n')),
169+
MaterialButton(
170+
onPressed: () => isUserResolvable(),
171+
child: const Text('Error resolvable by user'),
172+
color: Colors.red,
173+
),
174+
Center(
175+
child: Text('Error resolvable by user: $_isUserResolvable\n'),
176+
),
177+
MaterialButton(
178+
onPressed: () => showErrorNotification(),
179+
child: const Text('Show error notification'),
180+
color: Colors.red,
181+
),
182+
const SizedBox(height: 30),
183+
MaterialButton(
184+
onPressed: () => showErrorDialogFragment(),
185+
child: const Text('Show error dialog fragment'),
186+
color: Colors.red,
187+
),
188+
Center(
189+
child: Text('Error dialog shown: $_errorDialogFragmentShown\n'),
190+
),
191+
],
192+
),
193+
),
190194
);
191195
}
192196
}

google_api_availability/lib/src/google_api_availability.dart

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ class GoogleApiAvailability {
2020
///
2121
/// Optionally, you can also show an error dialog if the connection status is
2222
/// not [SUCCESS].
23-
Future<GooglePlayServicesAvailability> checkGooglePlayServicesAvailability(
24-
[bool showDialogIfNecessary = false]) async {
23+
Future<GooglePlayServicesAvailability> checkGooglePlayServicesAvailability([
24+
bool showDialogIfNecessary = false,
25+
]) async {
2526
if (GoogleApiAvailabilityPlatform.instance == null) {
2627
throw UnsupportedError('This platform is not supported.');
2728
}

0 commit comments

Comments
 (0)