Skip to content

Commit

Permalink
fix chaos lmao
Browse files Browse the repository at this point in the history
  • Loading branch information
sakofchit committed Nov 28, 2022
1 parent 913daf3 commit f768752
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
1 change: 0 additions & 1 deletion lib/alt_menu/alt_menu_item.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:retro/alt_menu/alt_sub_menu.dart';
import 'package:retro/ipod_menu_widget/ipod_sub_menu.dart';

class AltMenuItem {
final String text;
Expand Down
1 change: 0 additions & 1 deletion lib/alt_menu/alt_sub_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import 'package:flutter/material.dart';
import 'package:retro/alt_menu/alt_menu_item.dart';
import 'package:retro/ipod_menu_widget/ipod_menu_item.dart';

typedef AltMenuItemBuilder = List<AltMenuItem> Function();

Expand Down
14 changes: 10 additions & 4 deletions lib/core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class IPodState extends State<IPod> {
void initState() {
mainViewMode = MainViewMode.menu;
menu = getIPodMenu();
altMenu = getAltMenu();
altMenu = getAltMenu(context);
widgetSize = 300.0;
halfSize = widgetSize / 2;
cartesianStartX = 1;
Expand Down Expand Up @@ -356,9 +356,11 @@ class IPodState extends State<IPod> {
breakoutGame.currentState?.restart();
}
}
else if(popUp == true) {
altMenuKey?.currentState?.select();
}
else {
menuKey?.currentState?.select();
altMenuKey?.currentState?.select();
}
HapticFeedback.mediumImpact();
SystemSound.play(SystemSoundType.click);
Expand All @@ -370,21 +372,25 @@ class IPodState extends State<IPod> {
);
}

AltSubMenu getAltMenu() {
AltSubMenu getAltMenu(context) {
return AltSubMenu(
items: [
AltMenuItem(
text: 'Spotify',
onTap: () {
//BlocProvider.of<SongListBloc>(context).add(SpotifyConnected());
BlocProvider.of<SongListBloc>(context).add(SpotifyConnected());
}
),
AltMenuItem(
text: 'Apple Music',
),
AltMenuItem(
text: 'Cancel',
onTap:() => setState(() {
popUp = false;
}),
),

],
);
}
Expand Down

0 comments on commit f768752

Please sign in to comment.