chore: update widgets to current state from other PRs

pull/254/head
arturplaczek 3 years ago
parent 12c8492b1c
commit a0c7e8eb42

@ -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,

@ -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';

@ -88,6 +88,7 @@ class _SelectedCharacterState extends State<SelectedCharacter>
Text(
currentCharacter.name,
style: AppTextStyle.headline3,
textAlign: TextAlign.center,
),
const SizedBox(height: 20),
SizedBox(

@ -61,14 +61,14 @@ class StarAnimation extends StatelessWidget {
final double _stepTime;
/// Returns a list of assets to be loaded.
static Future<void> loadAssets() {
static List<Future> 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

@ -80,7 +80,7 @@ void _showPinballDialog({
builder: (_) {
return Center(
child: SizedBox(
height: gameWidgetWidth,
height: gameWidgetWidth * 0.87,
width: gameWidgetWidth,
child: child,
),

@ -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,
),
],
],
),
),
),
),

@ -11,7 +11,6 @@ import '../../helpers/helpers.dart';
void main() {
TestWidgetsFlutterBinding.ensureInitialized();
late CharacterThemeCubit characterThemeCubit;
setUpAll(() async {

Loading…
Cancel
Save