Skip to content

Commit

Permalink
feat: set platform to default platform on start up
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Nov 24, 2022
1 parent a8330ef commit 472da6b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ class SpotubeState extends ConsumerState<Spotube> with WidgetsBindingObserver {
super.initState();
SharedPreferences.getInstance().then(((value) => localStorage = value));
WidgetsBinding.instance.addObserver(this);
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
setState(() {
appPlatform = Theme.of(context).platform;
});
});
}

@override
Expand Down

0 comments on commit 472da6b

Please sign in to comment.