I want to use the flutter upgrader package.
Is there a configuration element I've forgotten to automatically detect the latest version released?
How can I manage the upgrade in the most efficient way?
The problem is that if I don't set the minAppVersion I don't get an alert even if I build a version older than the one available on the appStore.
class Check extends StatelessWidget {
Check({Key? key}) : super(key: key);
final fb = FirebaseDatabase.instance;
@override
Widget build(BuildContext context) {
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
return MaterialApp(
home: PopScope(
canPop: false,
child: UpgradeAlert(
upgrader: Upgrader(
canDismissDialog: false,
showLater: false,
showIgnore: false,
minAppVersion: '2.2.2',
showReleaseNotes: true,
),
child: StreamBuilder<User?>(
stream: FirebaseAuth.instance.authStateChanges(),
builder: (context, snapshot) {
if (snapshot.hasData) {
// print("data ${snapshot.data?.email}");
return const Home();
} else {
// print("no data");
return const MyLogin();
}
}, // StreamBuilder
),
),
),
); // MaterialApp
}
}```