fix: apply code review

pull/223/head
arturplaczek 3 years ago
parent ccec15fa94
commit 34a5220467

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

@ -14,9 +14,6 @@ class AndroidTheme extends CharacterTheme {
@override
Color get ballColor => Colors.green;
@override
AssetGenImage get character => Assets.images.android.character;
@override
AssetGenImage get background => Assets.images.android.background;
@ -27,5 +24,5 @@ class AndroidTheme extends CharacterTheme {
AssetGenImage get leaderboardIcon => Assets.images.android.leaderboardIcon;
@override
String get animationPath => Assets.images.android.animation.keyName;
AssetGenImage get animation => Assets.images.android.animation;
}

@ -18,9 +18,6 @@ abstract class CharacterTheme extends Equatable {
/// Ball color for this theme.
Color get ballColor;
/// Asset for the theme character.
AssetGenImage get character;
/// Asset for the background.
AssetGenImage get background;
@ -30,16 +27,16 @@ abstract class CharacterTheme extends Equatable {
/// Icon asset for the leaderboard.
AssetGenImage get leaderboardIcon;
/// Path to the asset for the animation.
String get animationPath;
/// Icon asset for the the animation.
AssetGenImage get animation;
@override
List<Object?> get props => [
name,
ballColor,
character,
background,
icon,
leaderboardIcon,
animation,
];
}

@ -14,9 +14,6 @@ class DashTheme extends CharacterTheme {
@override
Color get ballColor => Colors.blue;
@override
AssetGenImage get character => Assets.images.dash.character;
@override
AssetGenImage get background => Assets.images.dash.background;
@ -27,5 +24,5 @@ class DashTheme extends CharacterTheme {
AssetGenImage get leaderboardIcon => Assets.images.dash.leaderboardIcon;
@override
String get animationPath => Assets.images.dash.animation.keyName;
AssetGenImage get animation => Assets.images.dash.animation;
}

@ -14,9 +14,6 @@ class DinoTheme extends CharacterTheme {
@override
Color get ballColor => Colors.grey;
@override
AssetGenImage get character => Assets.images.dino.character;
@override
AssetGenImage get background => Assets.images.dino.background;
@ -27,5 +24,5 @@ class DinoTheme extends CharacterTheme {
AssetGenImage get leaderboardIcon => Assets.images.dino.leaderboardIcon;
@override
String get animationPath => Assets.images.dino.animation.keyName;
AssetGenImage get animation => Assets.images.dino.animation;
}

@ -14,9 +14,6 @@ class SparkyTheme extends CharacterTheme {
@override
String get name => 'Sparky';
@override
AssetGenImage get character => Assets.images.sparky.character;
@override
AssetGenImage get background => Assets.images.sparky.background;
@ -27,5 +24,5 @@ class SparkyTheme extends CharacterTheme {
AssetGenImage get leaderboardIcon => Assets.images.sparky.leaderboardIcon;
@override
String get animationPath => Assets.images.sparky.animation.keyName;
AssetGenImage get animation => Assets.images.sparky.animation;
}

@ -6,10 +6,7 @@ import 'package:pinball_theme/pinball_theme.dart';
void main() {
group('AndroidTheme', () {
test('can be instantiated', () {
final androidTheme = AndroidTheme();
expect(androidTheme, isNotNull);
expect(androidTheme.animationPath, isNotNull);
expect(AndroidTheme(), isNotNull);
});
test('supports value equality', () {

@ -6,10 +6,7 @@ import 'package:pinball_theme/pinball_theme.dart';
void main() {
group('DashTheme', () {
test('can be instantiated', () {
final dashTheme = DashTheme();
expect(dashTheme, isNotNull);
expect(dashTheme.animationPath, isNotNull);
expect(DashTheme(), isNotNull);
});
test('supports value equality', () {

@ -6,10 +6,7 @@ import 'package:pinball_theme/pinball_theme.dart';
void main() {
group('DinoTheme', () {
test('can be instantiated', () {
final dinoTheme = DinoTheme();
expect(dinoTheme, isNotNull);
expect(dinoTheme.animationPath, isNotNull);
expect(DinoTheme(), isNotNull);
});
test('supports value equality', () {

@ -6,10 +6,7 @@ import 'package:pinball_theme/pinball_theme.dart';
void main() {
group('SparkyTheme', () {
test('can be instantiated', () {
final sparkyTheme = SparkyTheme();
expect(sparkyTheme, isNotNull);
expect(sparkyTheme.animationPath, isNotNull);
expect(SparkyTheme(), isNotNull);
});
test('supports value equality', () {

Loading…
Cancel
Save