Skip to content
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

Merged
merged 3 commits into from Aug 24, 2023
Merged

refactor: Fix lint issues across the codebase #2672

merged 3 commits into from Aug 24, 2023

Conversation

luanpotter
Copy link
Member

@luanpotter luanpotter commented Aug 24, 2023

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

  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

);

composition = await loadLottie(asset);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -7,12 +7,12 @@ class EmberPlayer extends SpriteAnimationComponent with TapCallbacks {
EmberPlayer({
required super.position,
required super.size,
void Function(EmberPlayer)? onTap,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


linter:
rules:
avoid_web_libraries_in_flutter: false
Copy link
Member Author

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,
Copy link
Member Author

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)) {
Copy link
Member Author

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';
Copy link
Member Author

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;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use flame's tau

@luanpotter luanpotter marked this pull request as ready for review August 24, 2023 02:46
@luanpotter luanpotter requested a review from spydon August 24, 2023 02:49
Copy link
Member

@spydon spydon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@luanpotter luanpotter merged commit 6fe9a24 into main Aug 24, 2023
6 checks passed
@luanpotter luanpotter deleted the luan.lint branch August 24, 2023 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants