Feel free to contact us to provide your feedback about anything. We are always responsing the questions in discussion tab. Let's talk and learn together.
Version Blocker intends to solve the following problems:
- To suggest users to update old versions to new ones available.
- For the developer, offering a simple and faster way of implement and personalize the message of version blocked
Developers that don't likes to write duplicated solutions and that wants to invest your time to impacts your app products.
Product's people that needs solutions to manage app versions intelligently.
The members of our current team had developed many apps in the last 11 years, and in many cases we need to develop a similar boilerplate solution the proposed here.
The features can vary a little bit, but we can consider that is possible to apply something like the Pareto's rule. 20% of the needs variations are sufficient for 80% of the apps needs.
- Encapsulated blocked version screen display logic
- Integration with realtime database to determine the blocked versions
- Customizable text style in title, body and button
- Customizable color button and background color
- Customizable image
Dart >=2.14.0
and Flutter >=2.5.3
, Firebase project.
To run the example project you need to have your own Firebase project and depending on the platform you want to:
- Create an iOS app with a bundle ID
com.example
(only required for the example project, you can use anything for your app) in Firebase console of your project and download generatedGoogleService-Info.plist
. Put it in theexample/ios/Runner
folder. You don't need to open Xcode to do it, it will expect this file in this folder. - Create an Android app with package name
com.example
(only required for the example project, you can use anything for your app) in Firebase console of your project and download generatedgoogle-services.json
. Put it in theexample/android/app
folder. - Let's create the realtime database structure (this step is necessary because this lib search and read the configuration in realtime database)
- Download this Json and change the name
- In firebase console, go to Realtime Database Section
- Click in "Import Json"
- Import the Json downloaded in step 4
- This will be the structure in your realtime database:
{
"blockedVersions" : {
"androidBuildNumber" : 8,
"iosBuildNumber" : 6
}
}
- Now you will be ready to set which version of your app will be locked and will see the lock screen
dependencies:
version_blocker_flutter: [email protected]:mobiplus-opensource/mobiplus-version-blocker-flutter
ref: 2ca2ed2 --last release
this approach was chosen as a temporary workaround as it quickly delivers the delivery with the latest lib version.
import 'package:version_blocker_flutter/version_blocker_flutter.dart';
Initialize Version Blocker
final blockApp = BlockApp();
You can now use the 'BlockApp()' class to show and manipulate the block screen properties
void initBlockVersion(BuildContext context) async {
final blockApp = BlockApp();
blockApp.titleText(titleText: 'teste de título',
titleStyle: TextStyle(backgroundColor: Colors.amber));
blockApp.button(
buttonStyle: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Colors.blue)));
await blockApp.initVersionBlocker(context);
}
> background color(Colors? backgroundColor)
> titleText({TextStyle? titleStyle, String? titleText})
> image({Image? image})
> middleText({String? middleText, TextStyle? middleTextStyle})
> bottomText({String? bottomText, TextStyle? bottomTextStyle})
> button({String? buttonText, TextStyle? buttonTextStyle, ButtonStyle? buttonStyle})
- We recommend the 110 character limit to keep the layout cohesive in the text fields
- Instructions for creating a dev environment:
- https://docs.flutter.dev/get-started/install
- Open the project in an editor (IDE) of your choice.
- Run the command:
flutter pub get
. - Open an emulator or connect a device.
- Run the command:
flutter run
. - Have a good time.
- Instructions on tool versions
- Flutter version: 2.5.3
- Dart Version: 2.14
- Emulators, Devices
We'd love you to contribute to Version Blocker Flutter. please read our Contribution Guide and Code of Conduct
- open a issue with the description and the way of reproduction. Give preference to adding images.