Create a new flutter app
- Create repository
- Initiate new app
flutter create --org com.yourdomain appname
- Initiate json-model
- Setup standard Directories
fluttertool setupdirs
- Design model with json
- Convert json to dart-models
- Setup standard Directories
- Add Firebase Authentication
- Add Firestore
- Add Fire UI
flutter pub add flutterfire_ui
See pub.devSign app:
- Do not alter, just write:
cd C:\Program Files\Android\Android Studio1\jre\bin
- Create a key:
keytool -exportcert -alias androiddebugkey -keystore "C:\Documents and Settings\Administrator.android\debug.keystore" | "C:\OpenSSL\bin\openssl" sha1 -binary |"C:\OpenSSL\bin\openssl" base64
keytool.exe -list -v \ -alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore
- Link: Authenticating Your Client
Convert via openssl
C:\openssl\bin\openssl.exe
eller brug tomeko.net
flutter pub upgrade
to ensure and install all packages- Setup setting
- Go to \android/app/build.gradle and change "minSdkVersion" to 21
- SPLASH Screen
flutter pub add flutter_native_splash
See pub.dev
- CORS
flutter_native_splash: # https://pub.dev/packages/flutter_native_splash
color: "#70d4e3"
branding: assets/logo.png
fullscreen: true
android_gravity: center_vertical
ios_content_mode: scaleToFill
* <code>flutter pub run flutter_native_splash:create</code>
- Register at firebase Firebare projects
- Register at facebook
Firebase configure
flutterfire configure
Riverpod generator
in pubspec.yaml
dev_dependencies:
flutter_test:
sdk: flutter
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^2.0.0
# a tool for running code generators
build_runner:
# the code generator
riverpod_generator: ^2.2.3
# riverpod_lint makes it easier to work with Riverpod
riverpod_lint:
# import custom_lint too as riverpod_lint depends on it
custom_lint:
Google Bucket CORS
Gå til dashboard: Dachboard
Åben console: Kig efter lille knap øverst til højre der ser sårn her ud ">_".
Google: CORS configuration examples
Opret en json-fil, fx: <bucketid - exsite-c6bf0>_cors_file.json
Cmd: echo "[ { "origin": ["*"], "method": ["GET"], "maxAgeSeconds": 3600 }]" > <bucketid - exsite-c6bf0>_cors_file.json
Cmd: gcloud storage buckets update gs://<bucketid - exsite-c6bf0>.appspot.com --cors-file=<bucketid - exsite-c6bf0>_cors_file.json