-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#15: Refactor MapPage and added lint analyzer
- Loading branch information
1 parent
358893c
commit e20dcc7
Showing
4 changed files
with
68 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
include: package:pedantic/analysis_options.yaml | ||
|
||
analyzer: | ||
exclude: | ||
- lib/src/locations.g.dart | ||
|
||
linter: | ||
rules: | ||
- always_declare_return_types | ||
- camel_case_types | ||
- empty_constructor_bodies | ||
- annotate_overrides | ||
- avoid_init_to_null | ||
- constant_identifier_names | ||
- one_member_abstracts | ||
- slash_for_doc_comments | ||
- sort_constructors_first | ||
- unnecessary_brace_in_string_interps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
import 'dart:async'; | ||
|
||
import 'package:flutter_app/bloc/bloc_provider.dart'; | ||
import 'package:google_maps_flutter/google_maps_flutter.dart'; | ||
|
||
class MapBloc extends BlocBase { | ||
StreamController<MapType> _mapTypeController = | ||
StreamController<MapType>.broadcast(); | ||
|
||
Stream<MapType> get mayType => _mapTypeController.stream; | ||
|
||
@override | ||
void dispose() {} | ||
void dispose() { | ||
_mapTypeController.close(); | ||
} | ||
|
||
void setMayType(MapType mayType) { | ||
_mapTypeController.sink.add(mayType); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters