refactor: continue lint cleanup - 96 more issues fixed
- Add @immutable to classes with ==/hashCode (homePage, basicLocation, fireNotification, yourLocation, monitoredAreas) - Fix camel_case_types (genericMap → GenericMap) - Fix avoid_dynamic_calls (firesApi - typed responses) - Fix use_build_context_synchronously (locationUtils) - Fix always_put_control_body_on_new_line (4 reducers) - Fix always_specify_types (placesAutocompleteUtils, reducers) - Fix eol_at_end_of_file (4 files) - Fix prefer_function_declarations_over_variables (introPage) - Fix flutter_style_todos (fireMapReducer) Build: APK generated, 0 errors, 0 warnings
This commit is contained in:
parent
862d423f6b
commit
68ad4adbcf
23 changed files with 118 additions and 95 deletions
|
|
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_map/flutter_map.dart';
|
||||
import 'package:flutter_redux/flutter_redux.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:redux/src/store.dart';
|
||||
|
||||
import 'colors.dart';
|
||||
|
|
@ -11,8 +12,8 @@ import 'generated/i18n.dart';
|
|||
import 'mainDrawer.dart';
|
||||
import 'models/appState.dart';
|
||||
|
||||
@immutable
|
||||
class _ViewModel {
|
||||
|
||||
_ViewModel(this.monitoredAreas);
|
||||
List<Polyline> monitoredAreas;
|
||||
|
||||
|
|
@ -41,8 +42,7 @@ class MonitoredAreasPage extends StatelessWidget {
|
|||
},
|
||||
builder: (BuildContext context, _ViewModel view) {
|
||||
return Scaffold(
|
||||
appBar:
|
||||
AppBar(title: Text(S.of(context).monitoredAreasTitle)),
|
||||
appBar: AppBar(title: Text(S.of(context).monitoredAreasTitle)),
|
||||
drawer: MainDrawer(context, MonitoredAreasPage.routeName),
|
||||
bottomNavigationBar: CustomBottomAppBar(
|
||||
fabLocation: FloatingActionButtonLocation.centerDocked,
|
||||
|
|
@ -51,7 +51,8 @@ class MonitoredAreasPage extends StatelessWidget {
|
|||
actions: <Widget>[
|
||||
Flexible(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 10.0, right: 10.0),
|
||||
padding:
|
||||
const EdgeInsets.only(left: 10.0, right: 10.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
|
|
@ -62,37 +63,35 @@ class MonitoredAreasPage extends StatelessWidget {
|
|||
])))
|
||||
]),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Column(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8.0, bottom: 8.0),
|
||||
child: Text(S.of(context).inGreenMonitoredAreas),
|
||||
),
|
||||
Flexible(
|
||||
child: FlutterMap(
|
||||
options: const MapOptions(
|
||||
initialCenter: LatLng(53.5775, 3.106111),
|
||||
initialZoom: 1.0,
|
||||
),
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 8.0, bottom: 8.0),
|
||||
child: Text(S.of(context).inGreenMonitoredAreas),
|
||||
),
|
||||
Flexible(
|
||||
child: FlutterMap(
|
||||
options: const MapOptions(
|
||||
initialCenter: LatLng(53.5775, 3.106111),
|
||||
initialZoom: 1.0,
|
||||
),
|
||||
children: <Widget>[
|
||||
TileLayer(
|
||||
urlTemplate:
|
||||
'https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png',
|
||||
subdomains: const <String>['a', 'b', 'c', 'd'],
|
||||
userAgentPackageName:
|
||||
'com.example.fires_flutter'),
|
||||
const CompassMapPluginWidget(),
|
||||
PolylineLayer(
|
||||
polylines: view.monitoredAreas,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
TileLayer(
|
||||
urlTemplate:
|
||||
'https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png',
|
||||
subdomains: const <String>['a', 'b', 'c', 'd'],
|
||||
userAgentPackageName: 'com.example.fires_flutter'),
|
||||
const CompassMapPluginWidget(),
|
||||
PolylineLayer(
|
||||
polylines: view.monitoredAreas,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue