"Crack Kraków with the Cracker app!"
Big thanks to mmBs for time and advice. 👏
- You first need to define certain Dart environment variables:
AUTH0_DOMAIN
- the domain address of your Auth0 accountAUTH0_CLIENT_ID
- the client ID of your mobile app from Auth0 Detailed instruction on how to define--dart-define
arguments you can find here.
- Please remember to turn on the Refresh Token Rotation and Refresh Token Expiration options in Auth0 (as described here) which make sure that a stolen refresh token is not used multiple times.
If you plan to edit the localization files present in lib/l10n
which are of ARB (Application Resource Bundle) format, it would be a good idea to get a special IDE plugin which understands how to format such files.
- Before running the app you will need Google Maps API key.
- After you get it, go to
android
directory and find the autogeneratedlocal.properties
file. - Add a new line with your API key in a format like this
google.mapsApiKey=YOUR_API_KEY
.
- Remember to turn off your emulator before you start the installation on a mobile device.
- To release the app for Android device just run
flutter build apk --release
. - The
apk
file should be present incracker-mobile-flutter\build\app\outputs\flutter-apk
directory with theapp-release.apk
name. - Download the SDK Platform Tools from Android Developers website. It includes the
adb
tool, that is Android Debug Bridge. Extract the contents of this ZIP file into an easily accessible folder (such asC:\adb
). - Turn on the USB debug mode on you phone. Usually you can start with tapping multiple times on the version in settings section, what unlocks the
{} Developer options
section. There you can find an switch which will allow USB debugging. - Open Powershell, Git Shell or any of those in the directory where the
adb.exe
is and run./adb.exe devices
. Your device should be listed. - Copy the
.apk
file to the directory where theadb.exe
file is and run./adb.exe install app-release.apk
. - After the
adb
console returns a message as below, the app should be available on your phone:
PS C:\android\platform-tools> .\adb.exe install cracker.apk
Performing Streamed Install
Success
flutter pub run build_runner build --delete-conflicting-outputs
- force generation of the JSON deserialization files
build_runner
- provides a concrete way of generating files using Dart code (used to generate JSON deserialization class files injson_serializable
)flutter_appauth
- a well-maintained wrapper package around AppAuth for Flutter developed by Michael Bui. AppAuth authenticates and authorizes users and supports the PKCE extension- (not yet migrated)
flutter_localizations
- package that specifies additionalMaterialApp
properties that include localization flutter_secure_storage
- library to securely persist data locally- (not yet migrated)
geolocator
- geolocation plugin which provides easy access to platform specific location services (FusedLocationProviderClient or if not available the LocationManager on Android and CLLocationManager on iOS) - (not yet migrated)
google_maps_flutter
- plugin that provides a Google Maps widget graphql-flutter
- a package based on Apollo GraphQL client that allows an integration with a GraphQL server in Flutterhttp
- a composable, Future-based library for making HTTP requests published by the Dart Teamjson_annotation
- defines the annotations used by json_serializable to create code for JSON serialization and deserializationjson_serializable
- it is used to generate a class that allows deserialization of a JSON to a Dart class object by annotating it with@JsonSerializable
and using thebuild_runner
to autogenerate a class file