mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Add analysis_options, fix and format. (#102)
This commit is contained in:
30
flutter_maps_firestore/analysis_options.yaml
Normal file
30
flutter_maps_firestore/analysis_options.yaml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
include: package:pedantic/analysis_options.yaml
|
||||||
|
|
||||||
|
analyzer:
|
||||||
|
strong-mode:
|
||||||
|
implicit-casts: false
|
||||||
|
implicit-dynamic: false
|
||||||
|
|
||||||
|
linter:
|
||||||
|
rules:
|
||||||
|
- avoid_types_on_closure_parameters
|
||||||
|
- avoid_void_async
|
||||||
|
- await_only_futures
|
||||||
|
- camel_case_types
|
||||||
|
- cancel_subscriptions
|
||||||
|
- close_sinks
|
||||||
|
- constant_identifier_names
|
||||||
|
- control_flow_in_finally
|
||||||
|
- empty_statements
|
||||||
|
- hash_and_equals
|
||||||
|
- implementation_imports
|
||||||
|
- non_constant_identifier_names
|
||||||
|
- package_api_docs
|
||||||
|
- package_names
|
||||||
|
- package_prefixed_library_names
|
||||||
|
- test_types_in_equals
|
||||||
|
- throw_in_finally
|
||||||
|
- unnecessary_brace_in_string_interps
|
||||||
|
- unnecessary_getters_setters
|
||||||
|
- unnecessary_new
|
||||||
|
- unnecessary_statements
|
||||||
@@ -109,7 +109,7 @@ class StoreCarousel extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.only(top: 10),
|
padding: const EdgeInsets.only(top: 10),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 90,
|
height: 90,
|
||||||
child: new StoreCarouselList(
|
child: StoreCarouselList(
|
||||||
documents: documents,
|
documents: documents,
|
||||||
mapController: mapController,
|
mapController: mapController,
|
||||||
),
|
),
|
||||||
@@ -187,8 +187,8 @@ class _StoreListTileState extends State<StoreListTile> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _retrievePlacesDetails() async {
|
Future<void> _retrievePlacesDetails() async {
|
||||||
final details =
|
final details = await _placesApiClient
|
||||||
await _placesApiClient.getDetailsByPlaceId(widget.document['placeId']);
|
.getDetailsByPlaceId(widget.document['placeId'] as String);
|
||||||
if (!_disposed) {
|
if (!_disposed) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_placePhotoUrl = _placesApiClient.buildPhotoUrl(
|
_placePhotoUrl = _placesApiClient.buildPhotoUrl(
|
||||||
@@ -202,8 +202,8 @@ class _StoreListTileState extends State<StoreListTile> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(widget.document['name']),
|
title: Text(widget.document['name'] as String),
|
||||||
subtitle: Text(widget.document['address']),
|
subtitle: Text(widget.document['address'] as String),
|
||||||
leading: Container(
|
leading: Container(
|
||||||
width: 100,
|
width: 100,
|
||||||
height: 100,
|
height: 100,
|
||||||
@@ -220,8 +220,8 @@ class _StoreListTileState extends State<StoreListTile> {
|
|||||||
CameraUpdate.newCameraPosition(
|
CameraUpdate.newCameraPosition(
|
||||||
CameraPosition(
|
CameraPosition(
|
||||||
target: LatLng(
|
target: LatLng(
|
||||||
widget.document['location'].latitude,
|
widget.document['location'].latitude as double,
|
||||||
widget.document['location'].longitude,
|
widget.document['location'].longitude as double,
|
||||||
),
|
),
|
||||||
zoom: 16,
|
zoom: 16,
|
||||||
),
|
),
|
||||||
@@ -253,15 +253,15 @@ class StoreMap extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
markers: documents
|
markers: documents
|
||||||
.map((document) => Marker(
|
.map((document) => Marker(
|
||||||
markerId: MarkerId(document['placeId']),
|
markerId: MarkerId(document['placeId'] as String),
|
||||||
icon: BitmapDescriptor.defaultMarkerWithHue(_pinkHue),
|
icon: BitmapDescriptor.defaultMarkerWithHue(_pinkHue),
|
||||||
position: LatLng(
|
position: LatLng(
|
||||||
document['location'].latitude,
|
document['location'].latitude as double,
|
||||||
document['location'].longitude,
|
document['location'].longitude as double,
|
||||||
),
|
),
|
||||||
infoWindow: InfoWindow(
|
infoWindow: InfoWindow(
|
||||||
title: document['name'],
|
title: document['name'] as String,
|
||||||
snippet: document['address'],
|
snippet: document['address'] as String,
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
.toSet(),
|
.toSet(),
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ packages:
|
|||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.0"
|
version: "2.2.0"
|
||||||
boolean_selector:
|
boolean_selector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -110,7 +110,7 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "1.6.2"
|
version: "1.6.2"
|
||||||
pedantic:
|
pedantic:
|
||||||
dependency: transitive
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: pedantic
|
name: pedantic
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
@@ -122,7 +122,7 @@ packages:
|
|||||||
name: quiver
|
name: quiver
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.2"
|
version: "2.0.3"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -169,7 +169,7 @@ packages:
|
|||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.4"
|
version: "0.2.5"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ dependencies:
|
|||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
pedantic: ^1.5.0
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
|
|||||||
@@ -5,5 +5,5 @@
|
|||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('This test always passes', (WidgetTester tester) async {});
|
testWidgets('This test always passes', (tester) async {});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user