zeba_academy_app_updater 0.0.1
zeba_academy_app_updater: ^0.0.1 copied to clipboard
Flutter package to handle app updates with optional and force update dialogs, version checking, and silent background updates.
zeba_academy_app_updater #
A Flutter package to help apps check for updates dynamically, display force or optional update dialogs, redirect to app stores, and perform silent background update checks.
Keep your users always on the latest version while optionally enforcing critical updates.
⨠Features #
-
š Version Check from API Fetch the latest app version from your backend.
-
ā” Force Update Dialog Force users to update when a critical release is available.
-
š Optional Update Notification Notify users about new versions without enforcing an update.
-
š Store Redirection Redirect users to Google Play Store or Apple App Store automatically.
-
𤫠Silent Background Update Check Check for updates in the background without disrupting the user experience.
-
š Changelog Display Show the release notes or changelog in the update dialog.
š¦ Installation #
Add this to your pubspec.yaml:
dependencies:
zeba_academy_app_updater: ^1.0.0
Then run:
flutter pub get
š Basic Usage #
Import the package:
import 'package:zeba_academy_app_updater/zeba_academy_app_updater.dart';
š Checking for Updates #
ZebaAppUpdater updater = ZebaAppUpdater(
context: context,
apiUrl: 'https://example.com/version',
playStoreUrl: 'https://play.google.com/store/apps/details?id=com.example.app',
appStoreUrl: 'https://apps.apple.com/app/id123456789', // optional
showOptionalUpdate: true, // optional
);
updater.checkUpdate();
𤫠Silent Background Check #
await updater.silentCheck();
ā Version Comparison (Internal) #
bool isUpdateAvailable = updater.testVersionComparison('2.0.0', '1.0.0'); // true
š± Example App #
import 'package:flutter/material.dart';
import 'package:zeba_academy_app_updater/zeba_academy_app_updater.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text("Zeba App Updater Test")),
body: const Center(child: UpdateWidget()),
),
);
}
}
class UpdateWidget extends StatefulWidget {
const UpdateWidget({super.key});
@override
State<UpdateWidget> createState() => _UpdateWidgetState();
}
class _UpdateWidgetState extends State<UpdateWidget> {
late ZebaAppUpdater updater;
@override
void initState() {
super.initState();
updater = ZebaAppUpdater(
context: context,
apiUrl: 'https://example.com/version',
playStoreUrl: 'https://play.google.com/store/apps/details?id=com.example.app',
appStoreUrl: 'https://apps.apple.com/app/id123456789',
);
updater.checkUpdate(); // Trigger update check
}
@override
Widget build(BuildContext context) {
return const Text("Checking for updates...");
}
}
šÆ Use Cases #
This package is ideal for:
- Apps with frequent updates
- Critical enterprise applications
- Financial or banking apps
- Educational apps delivering new content regularly
- Any app where keeping users updated is crucial
š Documentation #
For tutorials, examples, and detailed guides:
š¤ Contributing #
Contributions are welcome.
- Fork the repository
- Create a new feature branch
- Commit your changes
- Submit a pull request
š License #
This project is licensed under the GNU General Public License v3.0.
About Me #
⨠Iām Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at https://sufyanism.com/ or connect with me on https://www.linkedin.com/in/sufyanism
Your all-in-one no-bloat hub! #
š Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy.
Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience.
Level up your tech game today! š»āØ
Zeba Academy is a learning platform dedicated to coding, technology, and development.
ā” Visit our main site: https://zeba.academy ā” Explore hands-on courses and resources at: https://code.zeba.academy ā” Check out our YouTube for more tutorials: https://www.youtube.com/@zeba.academy ā” Follow us on Instagram: https://www.instagram.com/zeba.academy/
Thank you for visiting!
