Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • DanBaDo/ginkgo
  • flodef/ginkgo
  • zicmama/ginkgo
  • vjrj/ginkgo
  • pokapow/ginkgo
  • weblate/ginkgo
6 results
Show changes
Commits on Source (1398)
Showing
with 1351 additions and 172 deletions
......@@ -8,6 +8,9 @@
.buildlog/
.history
.svn/
.env
.env.dev
.env.*
# IntelliJ related
*.iml
......@@ -32,7 +35,6 @@
/build/
# Web related
lib/generated_plugin_registrant.dart
# Symbolication related
app.*.symbols
......@@ -44,3 +46,5 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release
build.sh
lib/env.g.dart
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
# This file should be version controlled.
version:
revision: b22742018b3edf16c6cadd7b76d9db5e7f9064b5
revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
channel: stable
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
- platform: linux
create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
- platform: macos
create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
- platform: windows
create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
{
"printWidth": 120,
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}
{
"recommendations": ["dart-code.dart-code", "dart-code.flutter", "esbenp.prettier-vscode"]
}
{
"version": "0.2.0",
"configurations": [
{
"name": "Flutter",
"request": "launch",
"type": "dart",
"args": ["--web-hostname", "127.0.0.1", "--web-port", "8181"]
},
{
"name": "Flutter (Linux)",
"program": "lib/main.dart",
"deviceId": "linux",
"request": "launch",
"type": "dart"
},
{
"name": "Flutter (macOS)",
"program": "lib/main.dart",
"deviceId": "macos",
"request": "launch",
"type": "dart"
},
{
"name": "Flutter (Windows)",
"program": "lib/main.dart",
"deviceId": "windows",
"request": "launch",
"type": "dart"
},
{
"name": "Flutter (Chrome)",
"request": "launch",
"deviceId": "chrome",
"type": "dart",
"args": ["--web-renderer", "html", "--web-hostname", "127.0.0.1", "--web-port", "8181"]
},
{
"name": "Flutter (Edge)",
"request": "launch",
"type": "dart",
"args": ["--web-renderer", "html", "--web-hostname", "127.0.0.1", "--web-port", "8181"]
},
{
"name": "Flutter (Firefox)",
"request": "launch",
"type": "dart",
"args": ["--web-renderer", "html", "--web-hostname", "127.0.0.1", "--web-port", "8181"]
},
{
"name": "Flutter (Safari)",
"request": "launch",
"type": "dart",
"args": ["--web-renderer", "html", "--web-hostname", "127.0.0.1", "--web-port", "8181"]
},
{
"name": "Flutter (Opera)",
"request": "launch",
"type": "dart",
"args": ["--web-renderer", "html", "--web-hostname", "127.0.0.1", "--web-port", "8181"]
},
{
"name": "Flutter (Vivaldi)",
"request": "launch",
"type": "dart",
"args": ["--web-renderer", "html", "--web-hostname", "127.0.0.1", "--web-port", "8181"]
},
{
"name": "Flutter (Internet Explorer)",
"request": "launch",
"type": "dart",
"args": ["--web-renderer", "html", "--web-hostname", "127.0.0.1", "--web-port", "8181"]
}
]
}
# Dockerfile
FROM nginx:latest
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y certbot curl tar && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
ARG GINKGO_WEB_VERSION=1.1.0
ARG GINKGO_WEB_VERSION_PATH=b711b00f3006b99fbc7403609f475eac
RUN curl -L https://git.duniter.org/vjrj/ginkgo/uploads/${GINKGO_WEB_VERSION_PATH}/ginkgo-web-${GINKGO_WEB_VERSION}.tgz | tar xfz - -C /usr/share/nginx/html/ --strip-components=2
COPY nginx.conf.template /etc/nginx/nginx.conf.template
RUN mkdir -p /etc/nginx/snippets && \
touch /etc/nginx/snippets/proxy-gva.conf && \
chmod 644 /etc/nginx/snippets/proxy-gva.conf
COPY proxy-gva.conf /etc/nginx/snippets/proxy-gva.conf
# Configuration of g1nkgo
COPY assets/env.production.txt /usr/share/nginx/html/assets/env.production.txt
# In fact this is where flutter looks for it (it seems like a bug)
RUN mkdir -p /usr/share/nginx/html/assets/assets/
COPY assets/env.production.txt /usr/share/nginx/html/assets/assets/env.production.txt
COPY assets/img/ /usr/share/nginx/html/assets/img/
# Copy the default nginx configuration and g1nkgo conf to restore in empty volumes
RUN cp -a /etc/nginx/ /etc/nginx-default/
# Exponer los puertos de nginx
EXPOSE 80
EXPOSE 443
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
This diff is collapsed.
# Flutter Production Boilerplate
## A flutter project containing bloc, flutter_lints, hive, easy_translations and more!
# Ğ1nkgo
This repository is the starting point for my personal projects. If you have any suggestions or improvements feel free to let me know. The project strives to implement best practices recommended by Google and other developers. These best practices include but are not limited to:
![Ğ1nkgo logo](./assets/img/logo.png 'Ğ1nkgo logo')
- Using BLOC & Cubit for state management.
- Using Flutter Lints for stricter linting rules.
- Using Hive for platform independent storage that also works for web.
- Project structure, const constructors, extracted widgets and many more...
Ğ1nkgo (aka Ginkgo) is a lightweight, easy to use Ğ1 wallet for Duniter v1 written in Flutter. The app allows
users to manage their Ğ1 currency and it's focused in simplicity.
## Installation
This repository requires [Flutter](https://flutter.dev/docs/get-started/install) to be installed and present in your development environment.
## Features
- Introduction for beginners
- Generation of Cesium wallet and persistence (if you refresh the page, it should display the same
wallet address).
- A point-of-sale device that generates a QR code for the public address and other QR codes with
amounts (which lightweight wallets will understand).
- Send Ğ1 transactions
- Transactions history page and Balance with persistence to load last transactions on boot
- Contact management and cache (to avoid too much API petitions)
- Internationalization (i18n)
- QR code reader
- Import/export of your wallet
- Automatic discover and selection of nodes, error recovery & retry
- Customizable via [env file](https://git.duniter.org/vjrj/ginkgo/-/blob/master/assets/env.production.txt)
- Inline tutorials
- Pagination of transactions
- Some contextual help (for example, by tapping on "Validity").
## Screenshots
| Wallet | Terminal card |
| ---------------------------------------------------------------- | ---------------------------------------------------------------------- |
| ![Card](./assets/img/card.png 'A walled in form of credit card') | ![Terminal card](./assets/img/terminal.png 'A terminal card metaphor') |
## Demo
This is a demo used for testing a development, please use a production server for stability:
[https://g1demo.comunes.net/](https://g1demo.comunes.net/)
## Ğ1nkgo in production
- [https://g1nkgo.comunes.org](https://g1nkgo.comunes.org)
- (...)
## Translations
First of all, you can contribute translating Ğ1nkgo to your language:
[https://weblate.duniter.org/projects/g1nkgo/g1nkgo/](https://weblate.duniter.org/projects/g1nkgo/g1nkgo/)
## Docker
mkdir -p ~/.ginkgo/nginx-conf
mkdir -p ~/.ginkgo/www
## Dev contributions
### Prerequisites
This repository requires [Flutter](https://flutter.dev/docs/get-started/install) to be installed and
present in your development environment.
Clone the project and enter the project folder.
```sh
git clone https://github.com/anfeichtinger/flutter_production_boilerplate.git
cd flutter_production_boilerplate
git clone https://git.duniter.org/vjrj/ginkgo.git
cd ginkgo
```
You can remove the screenshots located in [assets/img/](./assets/img).
Get the dependencies.
```sh
flutter pub get
```
Run the app via command line or through your development environment. (optional)
### Launch all the tests
```sh
flutter run lib/main.dart
flutter test
```
## Pub packages
### Build & deploy
This repository makes use of the following pub packages:
#### Prerequisites
| Package | Version | Usage |
| ------ | ------ | ------ |
| [Bloc](https://pub.dev/packages/bloc) | ^8.0.2 | State management*
| [Flutter Bloc](https://pub.dev/packages/flutter_bloc) | ^8.0.1 | State management*
| [Hydrated Bloc](https://pub.dev/packages/hydrated_bloc) | ^8.0.0 | Persists Bloc state with Hive
| [Equatable](https://pub.dev/packages/equatable) | ^2.0.3 | Easily compare custom classes, used for Bloc states*
| [Flutter Lints](https://pub.dev/packages/flutter_lints) | ^1.0.4 | Stricter linting rules
| [Path Provider](https://pub.dev/packages/path_provider) | ^2.0.9 | Get the save path for Hive
| [Flutter Displaymode](https://pub.dev/packages/flutter_displaymode) | ^0.3.2 | Support high refresh rate displays
| [Easy Localization](https://pub.dev/packages/easy_localization) | ^3.0.0 | Makes localization easy
| [Hive](https://pub.dev/packages/hive) | ^2.0.5 | Platform independent storage.
| [Url Launcher](https://pub.dev/packages/url_launcher) | ^6.0.20 | Open urls in Browser
| [Ionicons](https://pub.dev/packages/ionicons) | ^0.1.2 | Modern icon library
> \* Recommended to keep regardless of your project
Create a `.env` configuration file (and `.env-dev` for development) in the root of the project. Use the `dot.env.sample` file as template.
## Using this package as a starting point
#### Build for web
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.
Use first this command to enable web support:
### Changing the package and app name
```sh
flutter config --enable-web
```
You can follow the instructions in this [Stackoverflow issue](https://stackoverflow.com/a/51550358).
Then, build the app:
### Theme
```sh
flutter build web --no-tree-shake-icons
```
You can customize your brand colors in the [lib/config/theme.dart](./lib/config/theme.dart) file.
The project useses colors from [TailwindCSS](https://tailwindcss.com/docs/customizing-colors). As primary swatch the indigo color palette is used while for the text the gray color palette is used. Feel free to replace those values with your own.
In order to get a smooth transition for the text colors it is necessary to override each text type in the TextTheme.
NB: Add `--release` for a production build.
### Removing unwanted packages
If you are using a web browser different from Chrome, you should first find your browser's executable (example for Brave):
If a package is not listed, then removing it from [pubspec.yaml](./pubspec.yaml) as well as all imports and uses should be enough. This is required for removing every packages, the following instructions are an addition to that.
```sh
which brave-browser
```
#### Flutter Lints
Then, you should add the executable path to the environment variable `CHROME_EXECUTABLE` by typing the following command:
Delete the [analysis_options.yaml](./analysis_options.yaml) file.
As an alternative you can modify the rules in this file or use a different package like [Lint](https://pub.dev/packages/lint).
```sh
export CHROME_EXECUTABLE=/usr/bin/brave-browser
```
#### Easy Localization
NB: This is a temporary solution that will be reset when you close your terminal. If you want to make it permanent, you should add this variable to your `.bashrc` or `.zshrc` file:
Remove the [assets/translations](./assets/translations) folder.
Go to [ios/Runner/Info.plist](./ios/Runner/Info.plist) and remove the following code:
```sh
nano ~/.bashrc
```
Then, add the following line at the end of the file:
```sh
export CHROME_EXECUTABLE=/usr/bin/brave-browser
```
<key>CFBundleLocalizations</key>
<array>
<string>en</string>
<string>de</string>
</array>
Finally, reload your terminal:
```sh
source ~/.bashrc
```
#### Url Launcher
#### Build and deploy to your server
For iOS go to [ios/Runner/Info.plist](./ios/Runner/Info.plist) and remove the following code:
```sh
rsync --progress=info2 --delete -aH build/web/ youruser@yourserver:/var/www/ginkgo/
```
### Run dev environment
Run the app via command line or through your development environment. It will run the default built version.
```sh
flutter run
```
NB: If there are more than one built version, there will be a prompt asking for the version you want to use (for example, web or desktop)
If you want to directly run a specific version (for example, the web version), use:
```sh
flutter run -d "chrome"
```
In order to do gva operations, you should disable cors in the flutter run config:
```
<key>LSApplicationQueriesSchemes</key>
--web-browser-flag "--disable-web-security"
```
![cors disable](./assets/img/cors.png 'CORS disabled')
### Easy Localization
To add translations, add a .json translation file in the [assets/translations](./assets/translations)
folder, by prefixing the file with the language code (for example, `en.json` for English).
The file should be in the format:
```json
{
"key": "value"
}
```
Then, add the language in the [main.dart](./lib/main.dart) file:
```dart
supportedLocales: const <Locale>[
Locale('en', ''),
],
```
Go to [ios/Runner/Info.plist](./ios/Runner/Info.plist) and update the following code adding the language:
```
<key>CFBundleLocalizations</key>
<array>
<string>https</string>
<string>http</string>
<string>en</string>
</array>
```
For Android you can take a look at this [Stackoverflow issue](https://stackoverflow.com/a/65082750) for more information.
Go to [android/app/src/AndroidManifest.xml](./android/app/src/main/AndroidManifest.xml) and remove the following code:
Finally, add the language to the User Interface in the [screen](./lib/fifth_screen.dart) file:
```
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
</queries>
```dart
DropdownMenuItem<Locale>(
value: Locale('en'),
child: Text('English'),
),
```
## Screenshots
## Troubleshooting
1. If you cannot build the app, try to run `flutter clean` and then `flutter pub get`.
2. If it still doesn't work, try to delete the `build` folder and run `flutter pub get` again.
3. At least, you can try to run `flutter pub upgrade` to upgrade all the dependencies.
4. And in last resort, you can try to delete the `pubspec.lock` file and run `flutter pub get` again.
5. Finally, there is a troubleshooting command in flutter: `flutter doctor -v`.
## Credits
### Translations
#### Light Theme
- ast: dixebral
- ca: calbasi
- da: Gerhard Pischinger
- de: Andreas Wahlen and FW
- eo: flodef
- eu: Anna Ayala Alcalá
- fr: flodef, Hugo, Maaltir, Michel du 64, italpaola, poka and vincentux
- gl: Vijitâtman
- it: Anna Ayala Alcalá, italpaola
- nl: Maria Rosa Costa i Alandi
- pt: Carlos Neto
| Home Light | Info Light |
| ------ | ------ |
| ![Home Light](./assets/img/home_light.png) | ![Info Light](./assets/img/info_light.png) |
Thanks!
#### Dark Theme
### Others
| Home Dark German | Info Dark German |
| ------ | ------ |
| ![Home Dark](./assets/img/home_dark.png) | ![Info Dark](./assets/img/info_dark.png) |
- Ğ1 logos from duniter.org
- undraw intro images: https://undraw.co/license
- Chipcard https://commons.wikimedia.org/wiki/File:Chipcard.svg under the Creative Commons
Attribution-Share Alike 3.0 Unported license.
- [POS svg from wikimedia](https://commons.wikimedia.org/wiki/File:Card_Terminal_POS_Flat_Icon_Vector.svg) CC-BY-SA 4.0
- Open Sans: Copyright 2020 The Open Sans Project Authors (https://github.com/googlefonts/opensans) under the SIL Open Font License, Version 1.1.
- NotoEmoji: Copyright 2013 Google LLC under the SIL Open Font License, Version 1.1.
- Dejavu are (c) Bitstream DejaVu changes are in public domain.
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
### Pub packages used
This repository makes use of the following pub packages:
| Package | Version | Usage |
| ------------------------------------------------------------------- | ------- | ----------------------------------------------------- |
| [Durt](https://pub.dev/packages/durt) | ^0.1.6 | Duniter crypto lib |
| [Bloc](https://pub.dev/packages/bloc) | ^8.1.0 | State management |
| [Flutter Bloc](https://pub.dev/packages/flutter_bloc) | ^8.1.1 | State management |
| [Hydrated Bloc](https://pub.dev/packages/hydrated_bloc) | ^9.0.0 | Persists Bloc state with Hive |
| [Equatable](https://pub.dev/packages/equatable) | ^2.0.5 | Easily compare custom classes, used for Bloc states\* |
| [Flutter Lints](https://pub.dev/packages/flutter_lints) | ^2.0.1 | Stricter linting rules |
| [Path Provider](https://pub.dev/packages/path_provider) | ^2.0.11 | Get the save path for Hive |
| [Flutter Displaymode](https://pub.dev/packages/flutter_displaymode) | ^0.5.0 | Support high refresh rate displays |
| [Easy Localization](https://pub.dev/packages/easy_localization) | ^3.0.1 | Makes localization easy |
| [Hive](https://pub.dev/packages/hive) | ^2.2.3 | Platform independent storage. |
| [Url Launcher](https://pub.dev/packages/url_launcher) | ^6.1.7 | Open urls in Browser |
| [Ionicons](https://pub.dev/packages/ionicons) | ^0.2.2 | Modern icon library |
Thanks!
## License
MIT
GNU AGPL v3 (see LICENSE)
```
```
include: package:flutter_lints/flutter.yaml
# Specify analysis options.
#
# For a list of lints, see: http://dart-lang.github.io/linter/lints/
# See the configuration guide for more
# https://github.com/dart-lang/sdk/tree/main/pkg/analyzer#configuring-the-analyzer
#
# There are other similar analysis options files in the flutter repos,
# which should be kept in sync with this file:
#
# - analysis_options.yaml (this file)
# - https://github.com/flutter/plugins/blob/master/analysis_options.yaml
# - https://github.com/flutter/engine/blob/master/analysis_options.yaml
# - https://github.com/flutter/packages/blob/master/analysis_options.yaml
#
# This file contains the analysis options used for code in the flutter/flutter
# repository.
analyzer:
exclude: [build/**]
strong-mode:
implicit-casts: false
implicit-dynamic: false
language:
strict-casts: true
strict-raw-types: true
errors:
# treat missing required parameters as a warning (not a hint)
missing_required_param: warning
# treat missing returns as a warning (not a hint)
missing_return: warning
# allow having TODO comments in the code
todo: ignore
# allow self-reference to deprecated members (we do this because otherwise we have
# to annotate every member in every test, assert, etc, when we deprecate something)
deprecated_member_use_from_same_package: warning
# Turned off until null-safe rollout is complete.
unnecessary_null_comparison: ignore
exclude:
- "bin/cache/**"
# Ignore protoc generated files
- "dev/conductor/lib/proto/*"
- "lib/data/models/*g.dart"
- "lib/generated/**"
rules:
avoid_print: false
prefer_single_quotes: true
\ No newline at end of file
linter:
rules:
# This list is derived from the list of all available lints located at
# https://github.com/dart-lang/linter/blob/master/example/all.yaml
- always_declare_return_types
- always_put_control_body_on_new_line
# - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219
- always_specify_types
# - always_use_package_imports # we do this commonly
- annotate_overrides
# - avoid_annotating_with_dynamic # conflicts with always_specify_types
- avoid_bool_literals_in_conditional_expressions
# - avoid_catches_without_on_clauses # blocked on https://github.com/dart-lang/linter/issues/3023
# - avoid_catching_errors # blocked on https://github.com/dart-lang/linter/issues/3023
- avoid_classes_with_only_static_members
- avoid_double_and_int_checks
- avoid_dynamic_calls
- avoid_empty_else
- avoid_equals_and_hash_code_on_mutable_classes
- avoid_escaping_inner_quotes
- avoid_field_initializers_in_const_classes
# - avoid_final_parameters # incompatible with prefer_final_parameters
- avoid_function_literals_in_foreach_calls
- avoid_implementing_value_types
- avoid_init_to_null
- avoid_js_rounded_ints
# - avoid_multiple_declarations_per_line # seems to be a stylistic choice we don't subscribe to
- avoid_null_checks_in_equality_operators
# - avoid_positional_boolean_parameters # would have been nice to enable this but by now there's too many places that break it
- avoid_print
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
- avoid_redundant_argument_values
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
- avoid_return_types_on_setters
# - avoid_returning_null # still violated by some pre-nnbd code that we haven't yet migrated
- avoid_returning_null_for_void
# - avoid_returning_this # there are enough valid reasons to return `this` that this lint ends up with too many false positives
- avoid_setters_without_getters
- avoid_shadowing_type_parameters
- avoid_single_cascade_in_expression_statements
- avoid_slow_async_io
- avoid_type_to_string
- avoid_types_as_parameter_names
# - avoid_types_on_closure_parameters # conflicts with always_specify_types
- avoid_unnecessary_containers
- avoid_unused_constructor_parameters
- avoid_void_async
# - avoid_web_libraries_in_flutter # we use web libraries in web-specific code, and our tests prevent us from using them elsewhere
- await_only_futures
- camel_case_extensions
- camel_case_types
- cancel_subscriptions
# - cascade_invocations # doesn't match the typical style of this repo
- cast_nullable_to_non_nullable
# - close_sinks # not reliable enough
# - comment_references # blocked on https://github.com/dart-lang/linter/issues/1142
# - conditional_uri_does_not_exist # not yet tested
# - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204
- control_flow_in_finally
# - curly_braces_in_flow_control_structures # not required by flutter style
- depend_on_referenced_packages
- deprecated_consistency
# - diagnostic_describe_all_properties # enabled only at the framework level (packages/flutter/lib)
- directives_ordering
# - do_not_use_environment # there are appropriate times to use the environment, especially in our tests and build logic
- empty_catches
- empty_constructor_bodies
- empty_statements
- eol_at_end_of_file
- exhaustive_cases
- file_names
- flutter_style_todos
- hash_and_equals
- implementation_imports
# - invariant_booleans # too many false positives: https://github.com/dart-lang/linter/issues/811
- collection_methods_unrelated_type
# - join_return_with_assignment # not required by flutter style
- leading_newlines_in_multiline_strings
- library_names
- library_prefixes
- library_private_types_in_public_api
# - lines_longer_than_80_chars # not required by flutter style
# - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/linter/issues/453
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_default_cases
- no_duplicate_case_values
- no_leading_underscores_for_library_prefixes
- no_leading_underscores_for_local_identifiers
- no_logic_in_create_state
# - no_runtimeType_toString # ok in tests; we enable this only in packages/
- non_constant_identifier_names
- noop_primitive_operations
- null_check_on_nullable_type_parameter
- null_closures
# - omit_local_variable_types # opposite of always_specify_types
# - one_member_abstracts # too many false positives
- only_throw_errors # this does get disabled in a few places where we have legacy code that uses strings et al
- overridden_fields
- package_api_docs
- package_names
- package_prefixed_library_names
# - parameter_assignments # we do this commonly
- prefer_adjacent_string_concatenation
- prefer_asserts_in_initializer_lists
# - prefer_asserts_with_message # not required by flutter style
- prefer_collection_literals
- prefer_conditional_assignment
- prefer_const_constructors
- prefer_const_constructors_in_immutables
- prefer_const_declarations
- prefer_const_literals_to_create_immutables
# - prefer_constructors_over_static_methods # far too many false positives
- prefer_contains
# - prefer_double_quotes # opposite of prefer_single_quotes
# - prefer_equal_for_default_values
# - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
# - prefer_final_parameters # we should enable this one day when it can be auto-fixed (https://github.com/dart-lang/linter/issues/3104), see also parameter_assignments
- prefer_for_elements_to_map_fromIterable
- prefer_foreach
- prefer_function_declarations_over_variables
- prefer_generic_function_type_aliases
- prefer_if_elements_to_conditional_expressions
- prefer_if_null_operators
- prefer_initializing_formals
- prefer_inlined_adds
# - prefer_int_literals # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#use-double-literals-for-double-constants
- prefer_interpolation_to_compose_strings
- prefer_is_empty
- prefer_is_not_empty
- prefer_is_not_operator
- prefer_iterable_whereType
# - prefer_mixin # Has false positives, see https://github.com/dart-lang/linter/issues/3018
# - prefer_null_aware_method_calls # "call()" is confusing to people new to the language since it's not documented anywhere
- prefer_null_aware_operators
- prefer_relative_imports
- prefer_single_quotes
- prefer_spread_collections
- prefer_typing_uninitialized_variables
- prefer_void_to_null
- provide_deprecation_message
# - public_member_api_docs # enabled on a case-by-case basis; see e.g. packages/analysis_options.yaml
- recursive_getters
# - require_trailing_commas # blocked on https://github.com/dart-lang/sdk/issues/47441
- secure_pubspec_urls
- sized_box_for_whitespace
# - sized_box_shrink_expand # not yet tested
- slash_for_doc_comments
- sort_child_properties_last
- sort_constructors_first
# - sort_pub_dependencies # prevents separating pinned transitive dependencies
- sort_unnamed_constructors_first
- test_types_in_equals
- throw_in_finally
- tighten_type_of_initializing_formals
# - type_annotate_public_apis # subset of always_specify_types
- type_init_formals
# - unawaited_futures # too many false positives, especially with the way AnimationController works
- unnecessary_await_in_return
- unnecessary_brace_in_string_interps
- unnecessary_const
- unnecessary_constructor_name
# - unnecessary_final # conflicts with prefer_final_locals
- unnecessary_getters_setters
# - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498
- unnecessary_late
- unnecessary_new
- unnecessary_null_aware_assignments
- unnecessary_null_checks
- unnecessary_null_in_if_null_operators
- unnecessary_nullable_for_final_variable_declarations
- unnecessary_overrides
- unnecessary_parenthesis
# - unnecessary_raw_strings # what's "necessary" is a matter of opinion; consistency across strings can help readability more than this lint
- unnecessary_statements
- unnecessary_string_escapes
- unnecessary_string_interpolations
- unnecessary_this
- unrelated_type_equality_checks
- unsafe_html
- use_build_context_synchronously
# - use_colored_box # not yet tested
# - use_decorated_box # not yet tested
# - use_enums # not yet tested
- use_full_hex_values_for_flutter_colors
- use_function_type_syntax_for_parameters
- use_if_null_to_convert_nulls_to_bools
- use_is_even_rather_than_modulo
- use_key_in_widget_constructors
- use_late_for_private_fields_and_variables
- use_named_constants
- use_raw_strings
- use_rethrow_when_possible
- use_setters_to_change_properties
# - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182
- use_super_parameters
- use_test_throws_matchers
# - use_to_and_as_if_applicable # has false positives, so we prefer to catch this by code-review
- valid_regexps
- void_checks
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
plugins {
id "com.android.application"
id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 31
namespace = "org.comunes.ginkgo"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "dev.feichtinger.flutterproductionboilerplate.flutter_production_boilerplate"
minSdkVersion 23
targetSdkVersion 31
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
applicationId "org.comunes.ginkgo"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = 23
targetSdk = 33
versionCode = flutter.versionCode
versionName = flutter.versionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
signingConfig = signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
source = "../.."
}
-keep class androidx.lifecycle.DefaultLifecycleObserver
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.feichtinger.flutterproductionboilerplate.flutter_production_boilerplate">
package="org.comunes.ginkgo">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.feichtinger.flutterproductionboilerplate.flutter_production_boilerplate">
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
</queries>
<application
android:label="flutter_production_boilerplate"
android:icon="@mipmap/ic_launcher">
package="org.comunes.ginkgo">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission
android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
android:maxSdkVersion="34" />.
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- By awesome notifications -->
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:icon="@mipmap/ic_launcher"
android:label="Ginkgo"
android:requestLegacyExternalStorage="true">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:exported="true"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:windowSoftInputMode="adjustResize">
<meta-data android:name="flutter_deeplinking_enabled" android:value="false" />
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="june" android:host="org.comunes.ginkgo" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
......@@ -44,4 +65,12 @@
android:name="flutterEmbedding"
android:value="2" />
</application>
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
</queries>
</manifest>
package dev.feichtinger.flutterproductionboilerplate.flutter_production_boilerplate
package org.comunes.ginkgo
import io.flutter.embedding.android.FlutterActivity
......
android/app/src/main/res/mipmap-hdpi/ic_launcher.png

544 B | W: 0px | H: 0px

android/app/src/main/res/mipmap-hdpi/ic_launcher.png

1.58 KiB | W: 0px | H: 0px

android/app/src/main/res/mipmap-hdpi/ic_launcher.png
android/app/src/main/res/mipmap-hdpi/ic_launcher.png
android/app/src/main/res/mipmap-hdpi/ic_launcher.png
android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
android/app/src/main/res/mipmap-mdpi/ic_launcher.png

442 B | W: 0px | H: 0px

android/app/src/main/res/mipmap-mdpi/ic_launcher.png

2.45 KiB | W: 0px | H: 0px

android/app/src/main/res/mipmap-mdpi/ic_launcher.png
android/app/src/main/res/mipmap-mdpi/ic_launcher.png
android/app/src/main/res/mipmap-mdpi/ic_launcher.png
android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png

721 B | W: 0px | H: 0px

android/app/src/main/res/mipmap-xhdpi/ic_launcher.png

3.42 KiB | W: 0px | H: 0px

android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png

1.01 KiB | W: 0px | H: 0px

android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png

5.35 KiB | W: 0px | H: 0px

android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png

1.41 KiB | W: 0px | H: 0px

android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png

7.73 KiB | W: 0px | H: 0px

android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.feichtinger.flutterproductionboilerplate.flutter_production_boilerplate">
package="org.comunes.ginkgo">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
......