Skip to content

Commit

Permalink
changelog: [skip ci]
Browse files Browse the repository at this point in the history
added update available notifier
  • Loading branch information
gokadzev committed Jun 14, 2022
1 parent bc4068a commit 74bbb6c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/ui/rootPage.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import 'package:fluttertoast/fluttertoast.dart';
import 'package:just_audio/just_audio.dart';
import 'package:musify/helper/version.dart';
import 'package:musify/services/audio_manager.dart';
import 'package:musify/ui/homePage.dart';
import 'package:musify/ui/playlistsPage.dart';
Expand Down Expand Up @@ -32,6 +34,19 @@ class AppState extends State<Musify> {
audioPlayer?.durationStream.listen((d) => {
if (this.mounted) {setState(() => duration = d)}
});
checkAppUpdates().then((value) => {
if (value)
{
Fluttertoast.showToast(
msg: "App Update Is Available!",
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.BOTTOM,
timeInSecForIosWeb: 1,
backgroundColor: accent,
textColor: Colors.white,
fontSize: 14.0)
}
});
}

void initAudioPlayer() {
Expand Down

0 comments on commit 74bbb6c

Please sign in to comment.