-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Revise permissions & display dialog explaining location perms (#51
- Loading branch information
1 parent
fede9fa
commit ebfa2a2
Showing
7 changed files
with
220 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
part of 'showcase_cubit.dart'; | ||
|
||
class ShowcaseState { | ||
bool showcaseActive; | ||
bool showcaseAlreadyPlayed; | ||
// keep aircraft state and apply it after showcase ends | ||
// so user wont lose data when starting showcase with data already gathered | ||
AircraftState? aircraftState; | ||
|
||
ShowcaseState( | ||
{required this.showcaseActive, | ||
required this.showcaseAlreadyPlayed, | ||
this.aircraftState}); | ||
|
||
ShowcaseState copyWith({ | ||
bool? showcaseActive, | ||
bool? showcaseAlreadyPlayed, | ||
AircraftState? aircraftState, | ||
}) => | ||
ShowcaseState( | ||
showcaseActive: showcaseActive ?? this.showcaseActive, | ||
showcaseAlreadyPlayed: | ||
showcaseAlreadyPlayed ?? this.showcaseAlreadyPlayed, | ||
aircraftState: aircraftState ?? this.aircraftState, | ||
); | ||
} | ||
|
||
class ShowcaseStateNotInitialized extends ShowcaseState { | ||
ShowcaseStateNotInitialized({ | ||
required super.showcaseActive, | ||
required super.showcaseAlreadyPlayed, | ||
super.aircraftState, | ||
}); | ||
|
||
@override | ||
ShowcaseStateNotInitialized copyWith({ | ||
bool? showcaseActive, | ||
bool? showcaseAlreadyPlayed, | ||
AircraftState? aircraftState, | ||
}) => | ||
ShowcaseStateNotInitialized( | ||
showcaseActive: showcaseActive ?? this.showcaseActive, | ||
showcaseAlreadyPlayed: | ||
showcaseAlreadyPlayed ?? this.showcaseAlreadyPlayed, | ||
aircraftState: aircraftState ?? this.aircraftState, | ||
); | ||
} | ||
|
||
class ShowcaseStateInitialized extends ShowcaseState { | ||
ShowcaseStateInitialized({ | ||
required super.showcaseActive, | ||
required super.showcaseAlreadyPlayed, | ||
super.aircraftState, | ||
}); | ||
@override | ||
ShowcaseStateInitialized copyWith({ | ||
bool? showcaseActive, | ||
bool? showcaseAlreadyPlayed, | ||
AircraftState? aircraftState, | ||
}) => | ||
ShowcaseStateInitialized( | ||
showcaseActive: showcaseActive ?? this.showcaseActive, | ||
showcaseAlreadyPlayed: | ||
showcaseAlreadyPlayed ?? this.showcaseAlreadyPlayed, | ||
aircraftState: aircraftState ?? this.aircraftState, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.