fix: apply self review

pull/252/head
arturplaczek 3 years ago
parent 611c966c01
commit e6d23b0ec8

@ -1,2 +1,3 @@
export 'cubit/character_theme_cubit.dart';
export 'view/view.dart';
export 'widgets/widgets.dart';

@ -4,13 +4,12 @@ import 'package:pinball/select_character/select_character.dart';
import 'package:pinball_theme/pinball_theme.dart' hide Assets;
/// {@template character_icon}
/// Widget for displaying character icon.
/// Widget to display character icon.
///
/// On tap changes selected character in [CharacterThemeCubit].
/// {@endtemplate}
class CharacterIcon extends StatelessWidget {
/// {@macro character_icon}
const CharacterIcon(
CharacterTheme characterTheme, {
Key? key,

@ -11,7 +11,8 @@ import 'package:pinball_theme/pinball_theme.dart';
/// Widget to display the selected character based on the [CharacterThemeCubit]
/// state.
///
/// Displays a looped [SpriteAnimationWidget].
/// Displays the looped [SpriteAnimationWidget] and the character name on the
/// list.
/// {@endtemplate}
class SelectedCharacter extends StatefulWidget {
/// {@macro selected_character}
@ -22,7 +23,7 @@ class SelectedCharacter extends StatefulWidget {
@override
State<SelectedCharacter> createState() => _SelectedCharacterState();
/// Returns a list of assets to be loaded
/// Returns a list of assets to be loaded.
static List<Future> loadAssets() {
Flame.images.prefix = '';

@ -7,7 +7,7 @@ import 'package:pinball/gen/gen.dart';
/// {@template star_animation}
/// Widget to display a looped the star animation.
///
/// For animation is using [SpriteAnimationWidget].
/// For animation uses [SpriteAnimationWidget].
/// {@endtemplate}
class StarAnimation extends StatelessWidget {
const StarAnimation._({
@ -60,7 +60,7 @@ class StarAnimation extends StatelessWidget {
final int _rows;
final double _stepTime;
/// Returns a list of assets to be loaded
/// Returns a list of assets to be loaded.
static Future<void> loadAssets() {
Flame.images.prefix = '';

@ -11,6 +11,7 @@ import '../../helpers/helpers.dart';
void main() {
TestWidgetsFlutterBinding.ensureInitialized();
late CharacterThemeCubit characterThemeCubit;
setUpAll(() async {
@ -29,7 +30,7 @@ void main() {
});
group('SelectedCharacter', () {
testWidgets('loadAssets returns list of futures', (tester) async {
testWidgets('loadAssets method returns list of futures', (tester) async {
expect(SelectedCharacter.loadAssets(), isList);
});

Loading…
Cancel
Save