Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint on project #1284

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/lib/advanced/actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Actions {
email = await util.Dialog.prompt(context,
title: "Email log", labelText: 'Email', value: email, hintText: '');
if (email!.length > 0) {
prefs.setString("email", email!);
prefs.setString("email", email);
util.Dialog.alert(context, 'Email log',
'The log will be processed in the background (it can take some time depending on the size of the log). Your email client will launch when ready.');

Expand Down
16 changes: 10 additions & 6 deletions example/lib/advanced/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,18 @@ class _AdvancedAppState extends State<AdvancedApp> {
final ThemeData theme = ThemeData();
return new MaterialApp(
theme: theme.copyWith(
colorScheme: theme.colorScheme.copyWith(secondary:Colors.black),
colorScheme: theme.colorScheme.copyWith(secondary: Colors.black),
brightness: Brightness.light,
bottomAppBarColor: Colors.amberAccent,
bottomAppBarTheme: Theme.of(context)
.bottomAppBarTheme
.copyWith(color: Colors.amberAccent),
hintColor: Colors.black12,
primaryTextTheme: Theme.of(context).primaryTextTheme.apply(
bodyColor: Colors.black,
)),
home:
Scaffold(body: HomeView(), floatingActionButtonLocation: FloatingActionButtonLocation.endFloat, floatingActionButton: MainMenuButton()));
bodyColor: Colors.black,
)),
home: Scaffold(
body: HomeView(),
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
floatingActionButton: MainMenuButton()));
}
}
14 changes: 7 additions & 7 deletions example/lib/advanced/geofence_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import 'package:flutter_background_geolocation_example/advanced/util/dialog.dart
as util;

class GeofenceView extends StatefulWidget {
LatLng? center;
List<LatLng>? vertices;
final LatLng? center;
final List<LatLng>? vertices;

GeofenceView({this.center, this.vertices});
@override
State createState() => _GeofenceViewState(center: this.center, vertices: this.vertices);
State createState() =>
_GeofenceViewState(center: this.center, vertices: this.vertices);
}

class _GeofenceViewState extends State<GeofenceView> {
Expand Down Expand Up @@ -55,7 +56,7 @@ class _GeofenceViewState extends State<GeofenceView> {
'longitude': center?.longitude
}
} // meta-data for tracker.transistorsoft.com
)).then((bool success) {
)).then((bool success) {
bg.BackgroundGeolocation.playSound(
util.Dialog.getSoundId('ADD_GEOFENCE'));
}).catchError((error) {
Expand Down Expand Up @@ -84,8 +85,7 @@ class _GeofenceViewState extends State<GeofenceView> {
},
'vertices': vertices
} // meta-data for tracker.transistorsoft.com
)).then((bool success) {

)).then((bool success) {
bg.BackgroundGeolocation.playSound(
util.Dialog.getSoundId('ADD_GEOFENCE'));
}).catchError((error) {
Expand All @@ -106,7 +106,7 @@ class _GeofenceViewState extends State<GeofenceView> {
color: Colors.black),
title: const Text('Add Geofence'),
foregroundColor: Colors.black,
backgroundColor: Theme.of(context).bottomAppBarColor,
backgroundColor: Theme.of(context).bottomAppBarTheme.color,
iconTheme: IconThemeData(color: Colors.black),
actions: [
MaterialButton(child: Text('Add'), onPressed: _onClickAdd)
Expand Down
Loading