A GitHub commits history viewer made with Flutter by mrverdant13.
Created with mrverdant13's Flutter project template, which is based on the Very Good CLI.
Android | iOS | MacOS | Linux | Windows | Web | |
---|---|---|---|---|---|---|
Flutter-level flavors | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
Internationalization | ✔️ | ❌ | ❌ | ❌ | ❌ | ❌ |
Native flavors | ✔️ | ❌ | ❌ | ❌ | ❌ | ❌ |
Different app icon per flavor | ✔️ | ❌ | ❌ | ❌ | ❌ | ❌ |
Different app splash per flavor | ✔️ | ❌ | ❌ | ❌ | ❌ | ❌ |
Different app splash per dark/light theme | ✔️ | ❌ | ❌ | ❌ | ❌ | ❌ |
App signing pre-configuration | ✔️ | ❌ | ❌ | ❌ | ❌ | ❌ |
- CI with GitHub Actions (includes code formatting, code analysis and testing)
- GitHub issue templates
- GitHub pull request template
- Strong lint rules
- Flutter 2 to build and test the project.
- Chocolatey on Windows to install and use
lcov
utils. - remove_from_coverage package to ignore generated files in coverage info.
This project supports 3 Flutter-level flavors that can be used directly with the launch configuration in Visual Studio Code or by executing one of the following commands:
# Development
$ flutter run --target lib/main_dev.dart
# Staging
$ flutter run --target lib/main_stg.dart
# Production
$ flutter run --target lib/main_stg.dart
Note: The target path separator (
\
or/
) might change according to the OS.
This project supports 3 native flavors (Android only) that can be used directly with the launch configuration in Visual Studio Code or by executing one of the following commands:
# Development
$ flutter run --flavor dev --target lib/main_dev.dart
# Staging
$ flutter run --flavor stg --target lib/main_stg.dart
# Production
$ flutter run --flavor stg --target lib/main_stg.dart
Note: The target path separator (
\
or/
) might change according to the OS.
This project relies on flutter_localizations and follows the official internationalization guide for Flutter.
-
To add a new localizable string, open the
app_<locale ID>.arb
file at thelib/l10n/arb/
folder.{ "@@locale": "<locale ID>", ··· "<valueKey>": "<value>", "@<valueKey>": { "description": "<description>" }, ··· }
-
Then add a new key, value and description
{ "@@locale": "<locale ID>", ··· "<valueKey>": "<value>", "@<valueKey>": { "description": "<description>" }, ··· "<newValueKey>": "<new value>", "@<newValueKey>": { "description": "<new value description>" } }
-
Use the new string
import 'package:<app_package_name>/l10n/l10n.dart'; ··· @override Widget build(BuildContext context) { final l10n = context.l10n; return Text(l10n.<newValueKey>); } ···
-
For each supported locale, add a new ARB file in
lib/l10n/arb
.├── lib │ ├── l10n │ │ ├── arb │ │ │ ├── app_<locale ID>.arb │ │ │ └── app_<new locale ID>.arb
-
Add the translated strings to each
.arb
file:app_<locale ID>.arb
{ "@@locale": "<locale ID>", ··· "<valueKey>": "<value for locale ID>", "@<valueKey>": { "description": "<description for locale ID>", }, ··· }
app_<new locale ID>.arb
{ "@@locale": "<new locale ID>", ··· "<valueKey>": "<value for new locale ID>", "@<valueKey>": { "description": "<description for new locale ID>" }, ··· }
To run all unit and widget tests, execute the following command:
$ flutter test --coverage -r expanded --test-randomize-ordering-seed random
To remove generated files from coverage info, install the remove_from_coverage package and run one of the following commands:
# If pub global scripts are on your path
remove_from_coverage -f coverage/lcov.info -r "\.freezed\.dart$","\.g\.dart$","\.gr\.dart$"
# Otherwise (might change depending on pub setup)
pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r "\.freezed\.dart$","\.g\.dart$","\.gr\.dart$"
To generate coverage report within the coverage
folder, run one of the following commands according to your OS:
# Linux/MacOS
# Generate coverage report
$ genhtml coverage/lcov.info -o coverage/html/
# Windows
# Install `lcov` utils (Chocolatey is prerequisite)
$ choco install lcov
# Generate coverage report (might change depending on Chocolatey setup)
$ perl C:\ProgramData\chocolatey\lib\lcov\tools\bin\genhtml -o coverage\html coverage\lcov.info
To open the generated coverage report, run one of the following commands according to your OS:
# Linux/MacOS
# Generate coverage report
$ open coverage/html/index.html
# Windows
$ start coverage/html/index.html
Submit a new issue report if you find any bug or have any suggestion.