mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
Add swingmusic-mobile submodule to replace Android app
- Updated .gitmodules to include mobile app submodule - Added swingmusic_mobile directory with Flutter app - Mobile app will now be built in unified release workflow
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
enum AuthState {
|
||||
loggedOut,
|
||||
authenticating,
|
||||
authenticated,
|
||||
error;
|
||||
|
||||
String get displayName {
|
||||
switch (this) {
|
||||
case AuthState.loggedOut:
|
||||
return 'Logged Out';
|
||||
case AuthState.authenticating:
|
||||
return 'Authenticating';
|
||||
case AuthState.authenticated:
|
||||
return 'Authenticated';
|
||||
case AuthState.error:
|
||||
return 'Error';
|
||||
}
|
||||
}
|
||||
|
||||
bool get isLoggedIn => this == AuthState.authenticated;
|
||||
bool get isLoggedOut => this == AuthState.loggedOut;
|
||||
bool get isAuthenticating => this == AuthState.authenticating;
|
||||
bool get hasError => this == AuthState.error;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
enum RepeatMode {
|
||||
off,
|
||||
one,
|
||||
all;
|
||||
|
||||
String get displayName {
|
||||
switch (this) {
|
||||
case RepeatMode.off:
|
||||
return 'Off';
|
||||
case RepeatMode.one:
|
||||
return 'Repeat One';
|
||||
case RepeatMode.all:
|
||||
return 'Repeat All';
|
||||
}
|
||||
}
|
||||
|
||||
RepeatMode next() {
|
||||
switch (this) {
|
||||
case RepeatMode.off:
|
||||
return RepeatMode.all;
|
||||
case RepeatMode.all:
|
||||
return RepeatMode.one;
|
||||
case RepeatMode.one:
|
||||
return RepeatMode.off;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum ShuffleMode {
|
||||
off,
|
||||
on;
|
||||
|
||||
String get displayName {
|
||||
switch (this) {
|
||||
case ShuffleMode.off:
|
||||
return 'Off';
|
||||
case ShuffleMode.on:
|
||||
return 'On';
|
||||
}
|
||||
}
|
||||
|
||||
ShuffleMode toggle() {
|
||||
switch (this) {
|
||||
case ShuffleMode.off:
|
||||
return ShuffleMode.on;
|
||||
case ShuffleMode.on:
|
||||
return ShuffleMode.off;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user