-
-
Notifications
You must be signed in to change notification settings - Fork 934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Fix lint issues across the codebase #2672
Conversation
); | ||
|
||
composition = await loadLottie(asset); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable is set twice, trips https://dcm.dev/docs/rules/common/avoid-unnecessary-reassignment
@@ -7,12 +7,12 @@ class EmberPlayer extends SpriteAnimationComponent with TapCallbacks { | |||
EmberPlayer({ | |||
required super.position, | |||
required super.size, | |||
void Function(EmberPlayer)? onTap, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name Function
type parameters, trips https://dcm.dev/docs/rules/common/prefer-explicit-parameter-names
|
||
linter: | ||
rules: | ||
avoid_web_libraries_in_flutter: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to put it here since it applies project-wise than in a single file
@@ -44,37 +44,37 @@ void main() { | |||
final routes = <String, Game Function()>{ | |||
'anchor_by_effect': AnchorByEffectGame.new, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
map keys alphabetical (was almost there)
@@ -23,11 +23,11 @@ class RemoveEffectGame extends FlameGame with TapDetector { | |||
|
|||
@override | |||
void onTap() { | |||
if (!children.contains(ember)) { | |||
if (children.contains(ember)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1,6 +1,7 @@ | |||
import 'package:doc_flame_examples/flower.dart'; | |||
import 'package:flame/effects.dart'; | |||
import 'package:flame/game.dart'; | |||
import 'package:flame/geometry.dart'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just using existing declaration of tau
import 'package:flame/rendering.dart'; | ||
|
||
const tau = 2 * pi; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use flame's tau
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
Description
Fix a couple lint issues across the codebase, identified by #2667
Nothing controversial, I expect; getting these out of the way so we can focus on discussing bigger things.
Checklist
docs
and added dartdoc comments with///
.examples
ordocs
.Breaking Change?