mirror of
https://github.com/flame-engine/flame.git
synced 2025-10-28 19:33:37 +08:00
Fix existing lint issues
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flame/box2d/box2d_component.dart';
|
||||
import 'package:flame/box2d/contact_callbacks.dart';
|
||||
import 'package:flame/components/component.dart';
|
||||
|
||||
@ -78,7 +78,7 @@ abstract class PositionComponent extends Component {
|
||||
bool renderFlipX = false;
|
||||
bool renderFlipY = false;
|
||||
bool debugMode = false;
|
||||
List<PositionComponentEffect> _effects = [];
|
||||
final List<PositionComponentEffect> _effects = [];
|
||||
|
||||
Color get debugColor => const Color(0xFFFF00FF);
|
||||
|
||||
|
||||
@ -46,12 +46,16 @@ class FlareComponent extends PositionComponent {
|
||||
@override
|
||||
set width(_width) {
|
||||
super.width = _width;
|
||||
if (loaded()) _flareAnimation.width = width;
|
||||
if (loaded()) {
|
||||
_flareAnimation.width = width;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
set height(_height) {
|
||||
super.height = _height;
|
||||
if (loaded()) _flareAnimation.height = height;
|
||||
if (loaded()) {
|
||||
_flareAnimation.height = height;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
library flame;
|
||||
|
||||
import 'package:audioplayers/audio_cache.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
if [[ $(flutter format -n .) ]]; then
|
||||
echo "files not formatted"
|
||||
echo "formatting issue"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $(dartanalyzer lib/) ]]; then
|
||||
echo "lintint issue"
|
||||
echo "lint issue"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user