-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
lucavps
committed
Jan 25, 2024
0 parents
commit 1cce35d
Showing
186 changed files
with
4,845 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
BASE_URL= | ||
ENCRYPTION_KEY= | ||
IV_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"flutterSdkVersion": "3.16.7", | ||
"flavors": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
**/doc/api/ | ||
.dart_tool/ | ||
.flutter-plugins | ||
.flutter-plugins-dependencies | ||
.packages | ||
.pub-cache/ | ||
.pub/ | ||
/build/ | ||
*.g.dart | ||
pubspec.lock | ||
|
||
# Web related | ||
lib/generated_plugin_registrant.dart | ||
|
||
# Symbolication related | ||
app.*.symbols | ||
|
||
# Obfuscation related | ||
app.*.map.json | ||
|
||
# Exceptions to above rules. | ||
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages | ||
.gradle | ||
/.vscode | ||
.env.staging | ||
.env.production | ||
.env | ||
/.fvm/flutter_sdk | ||
.mason |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# 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. | ||
|
||
version: | ||
revision: "ef1af02aead6fe2414f3aafa5a61087b610e1332" | ||
channel: "stable" | ||
|
||
project_type: app | ||
|
||
# Tracks metadata for the flutter migrate command | ||
migration: | ||
platforms: | ||
- platform: root | ||
create_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332 | ||
base_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332 | ||
- platform: android | ||
create_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332 | ||
base_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332 | ||
- platform: ios | ||
create_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332 | ||
base_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332 | ||
- platform: linux | ||
create_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332 | ||
base_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332 | ||
- platform: macos | ||
create_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332 | ||
base_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332 | ||
- platform: web | ||
create_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332 | ||
base_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332 | ||
- platform: windows | ||
create_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332 | ||
base_revision: ef1af02aead6fe2414f3aafa5a61087b610e1332 | ||
|
||
# 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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# flutter_leap_v2 | ||
|
||
<p align="center"> | ||
<img src="" alt="" width="" /> | ||
</p> | ||
|
||
<h1 align="center">Loomi Flutter Leap</h1> | ||
|
||
### Userful links | ||
|
||
- [Flutter Loomi GitBook](https://loomi.gitbook.io/flutter-loomi/) | ||
|
||
### | ||
|
||
#### Depends on Flutter 3.16.7 and Dart 3.2.4 > | ||
|
||
## 📋 Flutter APP commands | ||
|
||
### Dependencies update | ||
|
||
- `flutter pub get` | ||
|
||
### MobX store and retrofit generation | ||
|
||
- `flutter pub run build_runner build --delete-conflicting-outputs` | ||
|
||
### Icons generation | ||
|
||
- `Go to pubspec file and add the path of your icon on 'flutter_launcher_icons' section` | ||
|
||
- `The icon should be 512x512 or 1024x1024` | ||
|
||
- `dart run flutter_launcher_icons ou flutter pub run flutter_launcher_icons` | ||
|
||
### Native Splash Screen generation | ||
|
||
- `flutter pub run flutter_native_splash:create` | ||
|
||
### New Modules Generation | ||
|
||
- `On the first time install mason: dart pub global activate mason_cli` | ||
- `On the first time run: mason get` | ||
- `The just run: mason make gen_module -o lib/app/modules` | ||
|
||
### Code analysis | ||
|
||
- `flutter analyze` | ||
|
||
## 🏃♂️How to run | ||
|
||
> First, we need to update dependencies and generate code | ||
- `flutter pub get` | ||
- `flutter pub run build_runner build --d` | ||
|
||
> After that, we can run the application | ||
#### On Android: | ||
|
||
flavorsOptions = [staging, homolog, production] | ||
|
||
- `flutter run --flavor [flavorOption]` | ||
- Ex: `flutter run --flavor production` | ||
|
||
#### On iOS: | ||
|
||
- `cd ios && pod update && && pod install --repo-update` | ||
- `flutter run -- flavor [flavorOption]` | ||
|
||
#### To start a new project: | ||
|
||
- `replace the 'com.example.loomiFlutterBoilerplate' across all the files with your desired bundleId` | ||
- `on android/app/src/main/java/kotlin rename the subsequent folder names with your bundle id name` | ||
|
||
### To set Environments content | ||
|
||
- `On the environments.dart file check the keys you need` | ||
- `Depending on your desired flavor, create a .env.[flavorNameHere]. Ex: .env.staging` | ||
- `Add all the keys and corresponding values` | ||
- `Do never upload the .env file to the repository. Encode the file content and only decode it on your project build setup` | ||
|
||
## 📚 Stack | ||
|
||
- **GetIt** for dependency injection | ||
- **MobX** for reactivity | ||
- **Retrofit** for https requests | ||
- **Json_serializable** for json mapping | ||
- **Build_runner** for generated code | ||
|
||
# | ||
|
||
Made with ❤️ by **Loomi** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This file configures the analyzer, which statically analyzes Dart code to | ||
# check for errors, warnings, and lints. | ||
# | ||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled | ||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be | ||
# invoked from the command line by running `flutter analyze`. | ||
|
||
# The following line activates a set of recommended lints for Flutter apps, | ||
# packages, and plugins designed to encourage good coding practices. | ||
include: package:flutter_lints/flutter.yaml | ||
|
||
linter: | ||
# The lint rules applied to this project can be customized in the | ||
# section below to disable rules from the `package:flutter_lints/flutter.yaml` | ||
# included above or to enable additional rules. A list of all available lints | ||
# and their documentation is published at https://dart.dev/lints. | ||
# | ||
# Instead of disabling a lint rule for the entire project in the | ||
# section below, it can also be suppressed for a single line of code | ||
# or a specific dart file by using the `// ignore: name_of_lint` and | ||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file | ||
# producing the lint. | ||
rules: | ||
# avoid_print: false # Uncomment to disable the `avoid_print` rule | ||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule | ||
|
||
# Additional information about this file can be found at | ||
# https://dart.dev/guides/language/analysis-options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
gradle-wrapper.jar | ||
/.gradle | ||
/captures/ | ||
/gradlew | ||
/gradlew.bat | ||
/local.properties | ||
GeneratedPluginRegistrant.java | ||
|
||
# Remember to never publicly share your keystore. | ||
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app | ||
key.properties | ||
**/*.keystore | ||
**/*.jks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
plugins { | ||
id "com.android.application" | ||
id "kotlin-android" | ||
id "dev.flutter.flutter-gradle-plugin" | ||
} | ||
|
||
def localProperties = new Properties() | ||
def localPropertiesFile = rootProject.file('local.properties') | ||
if (localPropertiesFile.exists()) { | ||
localPropertiesFile.withReader('UTF-8') { reader -> | ||
localProperties.load(reader) | ||
} | ||
} | ||
|
||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') | ||
if (flutterVersionCode == null) { | ||
flutterVersionCode = '1' | ||
} | ||
|
||
def flutterVersionName = localProperties.getProperty('flutter.versionName') | ||
if (flutterVersionName == null) { | ||
flutterVersionName = '1.0' | ||
} | ||
|
||
android { | ||
namespace "com.example.flutter_leap_v2" | ||
compileSdkVersion 34 | ||
ndkVersion flutter.ndkVersion | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
} | ||
|
||
sourceSets { | ||
main.java.srcDirs += 'src/main/kotlin' | ||
} | ||
|
||
defaultConfig { | ||
applicationId "com.example.loomiFlutterBoilerplateV2" | ||
minSdkVersion 21 | ||
targetSdkVersion 33 | ||
versionCode flutterVersionCode.toInteger() | ||
versionName flutterVersionName | ||
multiDexEnabled true | ||
} | ||
|
||
flavorDimensions "app" | ||
productFlavors { | ||
production { | ||
dimension "app" | ||
applicationId "com.example.loomiFlutterBoilerplateV2.production" | ||
versionCode flutterVersionCode.toInteger() | ||
versionName flutterVersionName | ||
multiDexEnabled true | ||
} | ||
homolog { | ||
dimension "app" | ||
applicationId "com.example.loomiFlutterBoilerplateV2.homolog" | ||
versionCode flutterVersionCode.toInteger() | ||
versionName flutterVersionName | ||
multiDexEnabled true | ||
} | ||
staging { | ||
dimension "app" | ||
applicationId "com.example.loomiFlutterBoilerplateV2.staging" | ||
versionCode flutterVersionCode.toInteger() | ||
versionName flutterVersionName | ||
multiDexEnabled true | ||
} | ||
} | ||
|
||
buildTypes { | ||
release { | ||
signingConfig signingConfigs.debug | ||
} | ||
} | ||
} | ||
|
||
flutter { | ||
source '../..' | ||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
implementation 'com.android.support:multidex:1.0.3' | ||
} | ||
|
||
// apply plugin: 'com.google.gms.google-services' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<!-- The INTERNET permission is required for development. Specifically, | ||
the Flutter tool needs it to communicate with the running application | ||
to allow setting breakpoints, to provide hot reload, etc. | ||
--> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="app_name"></string> | ||
<string name="facebook_app_id"></string> | ||
<string name="fb_login_protocol_scheme"></string> | ||
<string name="package_name"></string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
<uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION"/> | ||
<uses-permission android:name="android.permission.CAMERA"/> | ||
<application | ||
android:label="@string/app_name" | ||
android:name="${applicationName}" | ||
android:icon="@mipmap/icon_launcher"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:exported="true" | ||
android:launchMode="singleTop" | ||
android:theme="@style/LaunchTheme" | ||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" | ||
android:hardwareAccelerated="true" | ||
android:windowSoftInputMode="adjustResize"> | ||
<!-- 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" | ||
/> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
<!-- Don't delete the meta-data below. | ||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> | ||
<meta-data | ||
android:name="flutterEmbedding" | ||
android:value="2" /> | ||
</application> | ||
</manifest> | ||
|
Oops, something went wrong.