diff --git a/lib/game/view/widgets/pinball_button.dart b/lib/game/view/widgets/pinball_button.dart index db388ef1..0f060497 100644 --- a/lib/game/view/widgets/pinball_button.dart +++ b/lib/game/view/widgets/pinball_button.dart @@ -21,17 +21,17 @@ class PinballButton extends StatelessWidget { @override Widget build(BuildContext context) { - return InkWell( - onTap: _onPressed, - child: DecoratedBox( - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage( - Assets.images.selectCharacter.pinballButton.keyName, - ), + return DecoratedBox( + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage( + Assets.images.selectCharacter.pinballButton.keyName, ), ), - child: Center( + ), + child: Center( + child: InkWell( + onTap: _onPressed, child: Padding( padding: const EdgeInsets.symmetric( horizontal: 32, diff --git a/lib/game/view/widgets/widgets.dart b/lib/game/view/widgets/widgets.dart index 2bc78c9b..69e8066f 100644 --- a/lib/game/view/widgets/widgets.dart +++ b/lib/game/view/widgets/widgets.dart @@ -1,6 +1,5 @@ export 'bonus_animation.dart'; export 'game_hud.dart'; export 'pinball_button.dart'; -export 'play_button_overlay.dart'; export 'round_count_display.dart'; export 'score_view.dart'; diff --git a/lib/select_character/widgets/selected_character.dart b/lib/select_character/widgets/selected_character.dart index 0b6fc758..b668c21e 100644 --- a/lib/select_character/widgets/selected_character.dart +++ b/lib/select_character/widgets/selected_character.dart @@ -88,6 +88,7 @@ class _SelectedCharacterState extends State Text( currentCharacter.name, style: AppTextStyle.headline3, + textAlign: TextAlign.center, ), const SizedBox(height: 20), SizedBox( diff --git a/lib/select_character/widgets/star_animation.dart b/lib/select_character/widgets/star_animation.dart index 62b0de4a..218ce366 100644 --- a/lib/select_character/widgets/star_animation.dart +++ b/lib/select_character/widgets/star_animation.dart @@ -61,14 +61,14 @@ class StarAnimation extends StatelessWidget { final double _stepTime; /// Returns a list of assets to be loaded. - static Future loadAssets() { + static List loadAssets() { Flame.images.prefix = ''; - return Flame.images.loadAll([ - Assets.images.selectCharacter.starA.keyName, - Assets.images.selectCharacter.starB.keyName, - Assets.images.selectCharacter.starC.keyName, - ]); + return [ + Flame.images.load(Assets.images.selectCharacter.starA.keyName), + Flame.images.load(Assets.images.selectCharacter.starB.keyName), + Flame.images.load(Assets.images.selectCharacter.starC.keyName), + ]; } @override diff --git a/lib/start_game/widgets/start_game_listener.dart b/lib/start_game/widgets/start_game_listener.dart index 2afe1a40..fd3097cd 100644 --- a/lib/start_game/widgets/start_game_listener.dart +++ b/lib/start_game/widgets/start_game_listener.dart @@ -80,7 +80,7 @@ void _showPinballDialog({ builder: (_) { return Center( child: SizedBox( - height: gameWidgetWidth, + height: gameWidgetWidth * 0.87, width: gameWidgetWidth, child: child, ), diff --git a/packages/pinball_ui/lib/src/dialog/pixelated_decoration.dart b/packages/pinball_ui/lib/src/dialog/pixelated_decoration.dart index a8478a11..542a00db 100644 --- a/packages/pinball_ui/lib/src/dialog/pixelated_decoration.dart +++ b/packages/pinball_ui/lib/src/dialog/pixelated_decoration.dart @@ -20,36 +20,34 @@ class PixelatedDecoration extends StatelessWidget { @override Widget build(BuildContext context) { const radius = BorderRadius.all(Radius.circular(12)); - const borderWidth = 5.0; - return DecoratedBox( - decoration: BoxDecoration( - image: DecorationImage( - fit: BoxFit.fill, - image: AssetImage(Assets.images.dialog.background.keyName), - ), - borderRadius: radius, - border: Border.all( - color: Colors.white, - width: borderWidth, - ), - ), + return Material( + borderRadius: radius, child: Padding( - padding: const EdgeInsets.all(borderWidth), - child: ClipRRect( - borderRadius: radius, - child: Column( - children: [ - Expanded( - child: Center( - child: _header, + padding: const EdgeInsets.all(5), + child: DecoratedBox( + decoration: BoxDecoration( + borderRadius: radius, + image: DecorationImage( + fit: BoxFit.fill, + image: AssetImage(Assets.images.dialog.background.keyName), + ), + ), + child: ClipRRect( + borderRadius: radius, + child: Column( + children: [ + Expanded( + child: Center( + child: _header, + ), + ), + Expanded( + flex: 4, + child: _body, ), - ), - Expanded( - flex: 4, - child: _body, - ), - ], + ], + ), ), ), ), diff --git a/test/select_character/widgets/selected_character_test.dart b/test/select_character/widgets/selected_character_test.dart index 70ccf3fc..a159d1ce 100644 --- a/test/select_character/widgets/selected_character_test.dart +++ b/test/select_character/widgets/selected_character_test.dart @@ -11,7 +11,6 @@ import '../../helpers/helpers.dart'; void main() { TestWidgetsFlutterBinding.ensureInitialized(); - late CharacterThemeCubit characterThemeCubit; setUpAll(() async {