Comments (6)
@rajrajputgs
You can use something like this:
final upgrader = Upgrader();
upgrader.initialize().then((value) {
if (upgrader.isUpdateAvailable()) {
print('$upgrader.currentAppStoreVersion}');
}
});
from upgrader.
@rajrajputgs Look at the code for UpgradeAlert and copy the relevant parts that you need.
from upgrader.
from upgrader.
@rajrajputgs You can use something like this:
final upgrader = Upgrader(); upgrader.initialize().then((value) { if (upgrader.isUpdateAvailable()) { print('$upgrader.currentAppStoreVersion}'); } });
This doesn't work though
from upgrader.
@GokulP48 What part doesn't work? Do you have any logs you can share?
from upgrader.
class MyApp extends ConsumerStatefulWidget {
const MyApp({super.key});
@OverRide
ConsumerState createState() => _MyAppState();
}
class _MyAppState extends ConsumerState {
@OverRide
void initState() {
super.initState();
ref.read(authProvider.notifier).isNewUser();
ref.read(authProvider.notifier).init();
}
@OverRide
Widget build(BuildContext context) {
final AuthState authState = ref.watch(authProvider);
switch (authState) {
case AuthState.unAuth:
final bool isNewUser = ref.read(authProvider.notifier).newUser;
return isNewUser ? const OnboardScreen() : const LoginScreen();
case AuthState.auth:
// PushNotification().initialize();
final upgrader = Upgrader();
upgrader.initialize().then((value) {
if (upgrader.isUpdateAvailable()) {
return const AppUpdateAvailable();
}
});
final AddressModel address =
ref.read(userProvider.notifier).userAddress;
return address.addressId == null
? const FindLocationScreen()
: const MainScreen();
default:
return const DefaultScreen();
}
}
}
this is my code , I hope you understand what i trying to do.
from upgrader.
Related Issues (20)
- debugDisplayOnce = true always shows the upgrader dialog even in RELEASE MODE HOT 1
- can't use durationUntilAlertAgain HOT 4
- checkVersion HOT 4
- does this package also detects and works if build changes . HOT 1
- Please upgrade plus_plugins to latest
- Please upgrade the device_info_plus dependency to the latest HOT 1
- Please upgrade the package_info_plus dependency to the latest HOT 3
- Last call to _streamController.add(_state) not picked up by UpgradeAlert StreamBuilder HOT 1
- Is there a way to test the package on a Package flight? Because it always get a null UpgraderAppcastStore. HOT 1
- [Feature request] Update package_info_plus deps HOT 2
- Huawei updates HOT 2
- Does it support for internal testing app also ? HOT 4
- Question on minAppVersion from stores with multiple locales HOT 1
- How to specify minAppVersion using appcast instead of playstore? HOT 1
- I used the updateAvailabe() method from the upgrade.sharedInstance to check if an update is available, but it consistently returns false even when a new version of the app is available in the respective store
- Please upgrade package_info_plus to ^8.0.0 HOT 5
- Add privacy manifest file for iOS HOT 1
- Pressing Upgrade doesn't open link. HOT 8
- Minimum tag on play store not working. HOT 5
- Do not pop the dialog when 'Update' is clicked. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from upgrader.