Skip to content

aeecleclair/Titan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5b47d82 · Jan 20, 2024
Nov 20, 2023
Nov 16, 2023
Oct 31, 2023
Oct 15, 2023
Nov 16, 2023
Jan 20, 2024
Nov 20, 2023
Oct 15, 2023
Aug 19, 2023
Aug 21, 2023
Nov 20, 2023
Sep 5, 2022
Nov 16, 2023
Feb 1, 2023
Nov 20, 2023
Sep 5, 2022
Oct 15, 2023
Oct 15, 2023
Oct 15, 2023
Oct 15, 2023
Jan 18, 2024
Nov 22, 2023

Repository files navigation

Titan

Titan is a cross platform frontend for our project Hyperion

Installing Flutter

https://docs.flutter.dev/get-started/install

Configuring VS Code

https://docs.flutter.dev/get-started/editor?tab=vscode

Change the backend url

In .env change:

RELEASE_HOST = "<>"

You can also specify a debug url :

DEBUG_HOST = "<>"

Web dev

https://docs.flutter.dev/get-started/web

flutter build web
cd build/web
python -m http.server 8001

Testing

https://docs.flutter.dev/testing

flutter test

If you want to run a specific test file :

flutter test path/to/file.dart

Linting

https://dart.dev/guides/language/analysis-options

flutter analyze

To fix some issues :

flutter analyze --fix

Formatting

dart format .

Debug on the iOS simulator

https://docs.flutter.dev/get-started/test-drive?tab=vscode

iOS export IPA

https://stackoverflow.com/questions/58724420/how-to-create-ipa-file-in-flutter-for-testing-purpose

Export signed app bundles for the Play Store

https://docs.flutter.dev/deployment/android

Don't forget to change the backend url

Follow Signing the app steps.

Change the app version:

In pubspec version flutterVersionCode number should be used after the + sign

flutter build appbundle

Export APKs

flutter build apk --split-per-abi

Advanced

Change the OAuth 2.0 client id

lib/auth/repositories/oauth2_repositoty.dart

Allows non SSL connexion to use a custom local Hyperion backend

iOS

Add to info.plist

<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
	<key>NSAllowsArbitraryLoads</key>
	<true/>
	<key>NSExceptionDomains</key>
	<dict>
		<key>yourdomain.com</key>
		<dict>
			<key>NSIncludesSubdomains</key>
			<true/>
			<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
			<false/>
		</dict>
	</dict>
</dict>

Android

Add to AndroidManifest.xml file in the android/app/src/main folder :

<application
    ...
    android:usesCleartextTraffic="true"
    ...   >

Mettre à jour l'icon de l'app

On utilise le module flutter_launcher_icons, après avoir modifié la config dans pubspec.yaml executer :

flutter pub get
flutter pub run flutter_launcher_icons

Use the linter

dart format .
flutter analyze