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:flutter_test/flutter_test.dart';
import 'package:tracktrace_example/main.dart'; import 'package:tracktrace_example/main.dart';
void main() { void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async { testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame. // Build our app and trigger a frame.

View file

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

View file

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