Skip to content
Snippets Groups Projects
Commit 6f024c81 authored by anfeichtinger's avatar anfeichtinger
Browse files
parents 5bfdf5ed 338d08e9
No related branches found
No related tags found
No related merge requests found
LICENSE 0 → 100644
MIT License
Copyright (c) 2021 Andreas Feichtinger
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
...@@ -18,13 +18,13 @@ git clone https://github.com/anfeichtinger/flutter_production_boilerplate.git ...@@ -18,13 +18,13 @@ git clone https://github.com/anfeichtinger/flutter_production_boilerplate.git
cd flutter_production_boilerplate cd flutter_production_boilerplate
``` ```
You can remove the screenshots located in [assets/img/](./assets/img).
Get the dependencies. Get the dependencies.
```sh ```sh
flutter pub get flutter pub get
``` ```
You can remove the screenshots located in [assets/img/](./assets/img).
Run the app via command line or through your development environment. (optional) Run the app via command line or through your development environment. (optional)
```sh ```sh
flutter run lib/main.dart flutter run lib/main.dart
...@@ -52,6 +52,7 @@ This repository makes use of the following pub packages: ...@@ -52,6 +52,7 @@ This repository makes use of the following pub packages:
## Using this package as a starting point ## Using this package as a starting point
After following the installation steps you can customize your project. After following the installation steps you can customize your project.
The screens and widgets that are inside the project can be easily replaced or removed. They are supposed to give the user a basic understanding of the relations between widgets and some good practices. The code includes some comments with documentation and examples. The examples can be found by searching for "Example:" inside the project files.
### Changing the package and app name ### Changing the package and app name
...@@ -125,4 +126,4 @@ Go to [android/app/src/AndroidManifest.xml](./android/app/src/main/AndroidManife ...@@ -125,4 +126,4 @@ Go to [android/app/src/AndroidManifest.xml](./android/app/src/main/AndroidManife
## License ## License
MIT MIT
\ No newline at end of file
import 'dart:io';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
...@@ -14,7 +15,9 @@ void main() async { ...@@ -14,7 +15,9 @@ void main() async {
/// Initialize packages /// Initialize packages
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
await EasyLocalization.ensureInitialized(); await EasyLocalization.ensureInitialized();
await FlutterDisplayMode.setHighRefreshRate(); if (Platform.isAndroid) {
await FlutterDisplayMode.setHighRefreshRate();
}
final tmpDir = await getTemporaryDirectory(); final tmpDir = await getTemporaryDirectory();
Hive.init(tmpDir.toString()); Hive.init(tmpDir.toString());
HydratedBloc.storage = await HydratedStorage.build( HydratedBloc.storage = await HydratedStorage.build(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment