Created and maintained by kula.app and all the amazing contributors.
OnLaunch is a service allowing app developers to notify app users about updates, warnings and maintenance Our open-source framework provides an easy-to-integrate client to communicate with the backend and display the user interface.
- Display customizable messages to your app users
- Set your app into maintenance mode with blocking messages
- Easy to integrate with existing Flutter apps
❗ In order to start using Onlaunch you must have the Flutter SDK installed on your machine.
Add flutter_onlaunch
to your pubspec.yaml
:
dependencies:
flutter_onlaunch:
Install it:
flutter packages get
Initialize the service in your main function:
void main() {
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
OnLaunch().init(publicKey, baseURL);
runApp(const MyApp());
}
Wrap your top widget with OnLaunchOverlay. The overlay has to come AFTER the MaterialAppWidget (or similar)
return MaterialApp(home: OnLaunchOverlay(child: MainWidget()));
To verify the setup, you can call the test method OnLaunch().preview({blocking})
.
The OnLaunch Flutter client provides a couple of configuration options:
Name | Description | Default |
---|---|---|
baseURL |
Base URL where the OnLaunch API is hosted at. Change this to point to your self-hosted instance of the OnLaunch server. | https://onlaunch.kula.app/api/ |
publicKey |
Public key used to authenticate with the API | |
shouldCheckOnConfigure |
Flag indicating if the client should check for new messages immediately after it has been configured. | true |
Please see our Contributing Guide .
Distributed under the MIT License
For first time users, install the very_good_cli:
dart pub global activate very_good_cli
To run all unit tests:
very_good test --coverage
To view the generated coverage report you can use lcov.
# Generate Coverage Report
genhtml coverage/lcov.info -o coverage/
# Open Coverage Report
open coverage/index.html