Fix formatting according to Flutter analyze

This commit is contained in:
Bart Ribbers 2023-01-24 10:15:13 +01:00
parent 196e71d48c
commit 291e6fc41e
3 changed files with 39 additions and 39 deletions

View file

@ -9,7 +9,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:tracktrace_example/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.

View file

@ -1,7 +1,7 @@
part of google_track_trace;
/// Styling object for the Google maps Style
///
///
/// Contains a List of features with stylers applied to them
/// Full documentation on all the possible style:
/// https://developers.google.com/maps/documentation/javascript/style-reference
@ -22,12 +22,13 @@ class GoogleTrackTraceMapTheme {
required this.themes,
});
final List<GoogleMapThemeFeature> themes;
String getJson() {
var sb = StringBuffer('[');
for (var property in themes) {
sb..write(jsonEncode(property.toJson()))
..write(',');
sb
..write(jsonEncode(property.toJson()))
..write(',');
}
sb.write(']');
return sb.toString();
@ -46,13 +47,13 @@ class GoogleMapThemeFeature {
Map toJson() {
return {
if(featureType != null) 'featureType': featureType,
if(elementType != null) 'elementType': elementType,
if (featureType != null) 'featureType': featureType,
if (elementType != null) 'elementType': elementType,
'stylers': stylers,
};
}
}
enum GoogleMapThemeFeatureType {
featureAll,
featureAll,
}

View file

@ -124,36 +124,36 @@ Future<BitmapDescriptor> createBitmapDescriptorFromIconData(
}
/// Paints the icon background
// void _paintCircleFill(Canvas canvas, Color color) {
// final paint = Paint()
// ..style = PaintingStyle.fill
// ..color = color;
// canvas.drawCircle(Offset(_circleOffset, _circleOffset),
//_fillCircleWidth, paint);
// }
// void _paintCircleFill(Canvas canvas, Color color) {
// final paint = Paint()
// ..style = PaintingStyle.fill
// ..color = color;
// canvas.drawCircle(Offset(_circleOffset, _circleOffset),
//_fillCircleWidth, paint);
// }
// /// Paints a circle around the icon
// void _paintCircleStroke(Canvas canvas, Color color) {
// final paint = Paint()
// ..style = PaintingStyle.stroke
// ..color = color
// ..strokeWidth = _circleStrokeWidth;
// canvas.drawCircle(Offset(_circleOffset, _circleOffset),
//_outlineCircleWidth, paint);
// }
// /// Paints a circle around the icon
// void _paintCircleStroke(Canvas canvas, Color color) {
// final paint = Paint()
// ..style = PaintingStyle.stroke
// ..color = color
// ..strokeWidth = _circleStrokeWidth;
// canvas.drawCircle(Offset(_circleOffset, _circleOffset),
//_outlineCircleWidth, paint);
// }
// /// Paints the icon
// void _paintIcon(Canvas canvas, Color color, IconData iconData) {
// final textPainter = TextPainter(textDirection: TextDirection.ltr);
// textPainter.text = TextSpan(
// text: String.fromCharCode(iconData.codePoint),
// style: TextStyle(
// letterSpacing: 0.0,
// fontSize: _iconSize,
// fontFamily: iconData.fontFamily,
// color: color,
// )
// );
// textPainter.layout();
// textPainter.paint(canvas, Offset(_iconOffset, _iconOffset));
// }
// /// Paints the icon
// void _paintIcon(Canvas canvas, Color color, IconData iconData) {
// final textPainter = TextPainter(textDirection: TextDirection.ltr);
// textPainter.text = TextSpan(
// text: String.fromCharCode(iconData.codePoint),
// style: TextStyle(
// letterSpacing: 0.0,
// fontSize: _iconSize,
// fontFamily: iconData.fontFamily,
// color: color,
// )
// );
// textPainter.layout();
// textPainter.paint(canvas, Offset(_iconOffset, _iconOffset));
// }