refactor: Fix lint issues across the codebase - Part 2 (#2677)

Fix a handful of lint issues across the codebase, identified using DCM.
Nothing controversial, I expect; slowly getting these out of the way so
we can focus on discussing bigger things.
This commit is contained in:
Luan Nico
2023-08-25 11:15:17 -07:00
committed by GitHub
parent 75aee76781
commit 10e4109c81
10 changed files with 56 additions and 33 deletions

View File

@ -7,7 +7,7 @@ import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
class HardwareKeyboardExample extends FlameGame {
static String description = '''
static const String description = '''
This example uses the HardwareKeyboardDetector mixin in order to keep
track of which keys on a keyboard are currently pressed.
@ -67,7 +67,7 @@ class MyKeyboardDetector extends HardwareKeyboardDetector
/// The names of keyboard keys (at least the most important ones). We can't
/// rely on `key.debugName` because this property is not available in release
/// builds.
static Map<PhysicalKeyboardKey, String> keyNames = {
static final Map<PhysicalKeyboardKey, String> keyNames = {
PhysicalKeyboardKey.hyper: 'Hyper',
PhysicalKeyboardKey.superKey: 'Super',
PhysicalKeyboardKey.fn: 'Fn',
@ -233,12 +233,12 @@ class KeyboardKey extends PositionComponent {
/// they are waiting to be removed.
bool visible = true;
static Vector2 padding = Vector2(24, 12);
static Paint borderPaint = Paint()
static final Vector2 padding = Vector2(24, 12);
static final Paint borderPaint = Paint()
..style = PaintingStyle.stroke
..strokeWidth = 3
..color = const Color(0xffb5ffd0);
static TextPaint textRenderer = TextPaint(
static final TextPaint textRenderer = TextPaint(
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,