update_checker_bottom_sheet 0.0.4
update_checker_bottom_sheet: ^0.0.4 copied to clipboard
A simple and customizable Flutter package to check for app updates via GitHub Releases, with built-in OTA downloading and installation support for Android.
Update Checker Bottom Sheet #
A simple and customizable Flutter package to check for app updates via GitHub Releases. It provides a beautiful, user-friendly bottom sheet that handles version comparison, OTA downloading, and installation on Android.
π Index #
- Screenshots
- Features
- Installation
- Android Setup
- Usage
- Customization
- GitHub Release Best Practices (Important)
- Note on Versioning (Important)
- License
πΈ Screenshots #
| Update Available | Downloading | Installing |
|---|---|---|
![]() |
![]() |
![]() |
π± Supported Platforms #
- β Android
- β iOS
- β Web
- β macOS
- β Windows
- β Linux
Currently, this package is designed exclusively for Android.
The underlying OTA (Over-The-Air) engine utilizes Android's FileProvider and Package Installer to handle APK downloads and installation. Support for other platforms (iOS, Windows, etc.) is not planned for the immediate future due to the specific requirements of OTA distribution on those systems.
β¨ Features #
- Android Native Support: Built specifically for Android with 100% compatibility for current build systems.
- OTA Updates: Handles the full lifecycleβfetching, downloading, and triggering the Android Package Installer.
- GitHub Integration: Automatically parses latest release tags, changelogs, and APK assets.
- Architecture Awareness: Intelligently detects device ABI (
arm64-v8a,armeabi-v7a,x86_64) and selects the matching APK. - "Up to Date" Notification: Optionally show a success UI if no update is found.
π¦ Installation #
Add this package to your pubspec.yaml via pub.dev:
dependencies:
update_checker_bottom_sheet: ^0.0.3
Or install it directly from GitHub:
dependencies:
update_checker_bottom_sheet:
git:
url: https://github.com/jydv402/update_checker_bottom_sheet.git
π οΈ Android Setup #
This package is designed for maximum simplicity. The only manual requirement is enabling Core Library Desugaring.
1. Enable Desugaring #
The underlying OTA engine requires desugaring to support older Android versions.
android/app/build.gradle (or build.gradle.kts):
android {
compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
dependencies {
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4")
}
2. Permissions #
The package automatically bundles the necessary permissions:
INTERNETREQUEST_INSTALL_PACKAGESREAD_EXTERNAL_STORAGE/WRITE_EXTERNAL_STORAGE
π Usage #
Simple Check #
Automatically checks GitHub and shows the sheet only if an update is found.
import 'package:update_checker_bottom_sheet/update_checker_bottom_sheet.dart';
void _checkForUpdates() async {
await UpdateCheckerBottomSheet.checkAndUpdate(
context,
config: const UpdateCheckerConfig(
githubRepo: "username/repo", // e.g. "jydv402/memno"
),
);
}
Force "Up to Date" UI #
Useful for "Check for Updates" buttons in a Settings menu.
await UpdateCheckerBottomSheet.checkAndUpdate(
context,
showIfUpToDate: true, // Shows "You are using the latest version" if no update
config: const UpdateCheckerConfig(githubRepo: "username/repo"),
);
β οΈ Important: Cleaning Up Old APK Files #
The checkAndUpdate function automatically cleans up old APK files from previous downloads to save storage space on the user's device. This ensures a smooth user experience without cluttering the device with temporary files.
π View the Sample Implementation
π¨ Customization #
We believe in deep customization. You can control every pixel, color, and string used in the bottom sheet.
π View the Full Customization Guide
π€ GitHub Release Best Practices (IMPORTANT) #
Important
To ensure the package correctly identifies and downloads your APKs, follow these guidelines when creating a GitHub Release:
- ABI Naming: The package looks for ABI names in the asset filenames. If your release has multiple APKs, name them like so:
app-arm64-v8a-release.apkapp-armeabi-v7a-release.apkapp-x86_64-release.apk
- Split per ABI: Use
flutter build apk --split-per-abito generate these files automatically. - Fallback Support: If no ABI-specific match is found, the package will fallback to assets named
universal.apkorapp-release.apk. - Changelog: The text in the GitHub Release "Description" field is automatically pulled and displayed as the "What's New" content.
π Note on Versioning (IMPORTANT) #
Important
Version comparison is the core of this package. Here is how it works:
- Semantic Versioning: It compares your local version (from
pubspec.yaml) with the GitHub Release Tag. - Build Numbers: It supports and compares build numbers (e.g.,
1.2.0+5is recognized as newer than1.2.0+4). - Tag Formatting: It gracefully handles
vprefixes (e.g., Tagv1.0.0matches Version1.0.0). - Pre-releases: Ensure your tags follow standard semantic versioning for predictable results.
π License #
This project is licensed under the MIT License - see the LICENSE file for details.



