Skip to content

Commit 2b015a9

Browse files
committed
Merge branch 'release/v1.0.0'
2 parents 9191342 + 61880fd commit 2b015a9

File tree

170 files changed

+12888
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+12888
-1
lines changed

.gitignore

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# VS code
20+
.vscode/
21+
22+
# The .vscode folder contains launch configuration and tasks you configure in
23+
# VS Code which you may wish to be included in version control, so this line
24+
# is commented out by default.
25+
#.vscode/
26+
27+
# Flutter/Dart/Pub related
28+
**/doc/api/
29+
**/ios/Flutter/.last_build_id
30+
.dart_tool/
31+
.flutter-plugins
32+
.flutter-plugins-dependencies
33+
.packages
34+
.pub-cache/
35+
.pub/
36+
/build/
37+
38+
# Symbolication related
39+
app.*.symbols
40+
41+
# Obfuscation related
42+
app.*.map.json
43+
44+
# Android Studio will place build artifacts here
45+
/android/app/debug
46+
/android/app/profile
47+
/android/app/release

.metadata

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled.
5+
6+
version:
7+
revision: eb6d86ee27deecba4a83536aa20f366a6044895c
8+
channel: stable
9+
10+
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
17+
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
18+
- platform: android
19+
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
20+
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
21+
- platform: ios
22+
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
23+
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
24+
- platform: linux
25+
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
26+
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
27+
- platform: macos
28+
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
29+
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
30+
- platform: web
31+
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
32+
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
33+
- platform: windows
34+
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
35+
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
36+
37+
# User provided section
38+
39+
# List of Local paths (relative to this file) that should be
40+
# ignored by the migrate tool.
41+
#
42+
# Files that are not part of the templates will be ignored by default.
43+
unmanaged_files:
44+
- 'lib/main.dart'
45+
- 'ios/Runner.xcodeproj/project.pbxproj'

README.md

Lines changed: 108 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,108 @@
1-
# team-mobile-app
1+
# [VaahFlutter by WebReinvent](https://docs.vaah.dev/vaahflutter)
2+
3+
VaahFlutter is a Flutter-based framework that provides common features required in any application.
4+
5+
The purpose of developing VaahFlutter is to create a framework that can be extended in a manageable and structured manner in order to develop large applications while not having to reinvent all essential functionalities every time.
6+
7+
For More Info Please Check: [docs.vaah.dev/vaahflutter](https://docs.vaah.dev/vaahflutter)
8+
9+
## Prerequisites
10+
11+
Project requires Dart and flutter versions:
12+
13+
```yaml
14+
sdk: ">=2.19.6"
15+
flutter: ">=3.7.11"
16+
```
17+
18+
To change minimum requirement of dart and flutter change the `sdk and flutter` versions under `environment` in the `pubspec.yaml` file.
19+
<hr />
20+
21+
## How to run app in different environments:
22+
23+
| **Environment name** | **Command** |
24+
| --- | --- |
25+
| Default | `flutter run` OR `flutter run --dart-define="environment=default"` |
26+
| Development | `flutter run --dart-define="environment=develop"` |
27+
| Staging/ QA | `flutter run --dart-define="environment=stage"` |
28+
| Production | `flutter run --dart-define="environment=production"` |
29+
30+
## How to build app?
31+
32+
### Building app with different environments
33+
34+
| **Platform** | **Environment name** | **Command** |
35+
| --- | --- | --- |
36+
| Android | Default | `flutter build apk` OR `flutter build apk --dart-define="environment=default"` |
37+
| Android | Development | `flutter build apk --dart-define="environment=develop"` |
38+
| Android | Staging/ QA | `flutter build apk --dart-define="environment=stage"` |
39+
| Android | Production | `flutter build apk --dart-define="environment=production"` |
40+
| Android (appbundle) | Default | `flutter build appbundle` OR `flutter build appbundle --dart-define="environment=default"` |
41+
| Android (appbundle) | Development | `flutter build appbundle --dart-define="environment=develop"` |
42+
| Android (appbundle) | Staging/ QA | `flutter build appbundle --dart-define="environment=stage"` |
43+
| Android (appbundle) | Production | `flutter build appbundle --dart-define="environment=production"` |
44+
45+
| **Platform** | **Environment name** | **Command** |
46+
| --- | --- | --- |
47+
| iOS | Default | `flutter build ipa` OR `flutter build ipa --dart-define="environment=default"` |
48+
| iOS | Development | `flutter build ipa --dart-define="environment=develop"` |
49+
| iOS | Staging/ QA | `flutter build ipa --dart-define="environment=stage"` |
50+
| iOS | Production | `flutter build ipa --dart-define="environment=production"` |
51+
| iOS (.app) | Default | `flutter build ios` OR `flutter build ipa --dart-define="environment=default"` |
52+
| iOS (.app) | Development | `flutter build ios --dart-define="environment=develop"` |
53+
| iOS (.app) | Staging/ QA | `flutter build ios --dart-define="environment=stage"` |
54+
| iOS (.app) | Production | `flutter build ios --dart-define="environment=production"` |
55+
56+
### Building in different modes.
57+
58+
Pass additional arguments with your build commands.
59+
60+
| **mode** | **Command** |
61+
| --- | --- |
62+
| Debug | `flutter build ipa --debug`, `flutter build apk --debug` |
63+
| Profile | `flutter build ipa --profile`, `flutter build apk --profile` |
64+
| Release | `flutter build ipa --release`, `flutter build apk --release` |
65+
66+
### Building ipa without signing it
67+
| **flag** | **command** |
68+
| --- | --- |
69+
| --no-codesign | `flutter build ipa --no-codesign`, `flutter build ios --no-codesign` |
70+
71+
Note: building for `ipa` will give `Runner.xcarchive`. To check the app, you should right click on `Runner.xcarchive` > then select `show package contents` > then open `products` > `application` > There you will be able to find the application.
72+
73+
## Packages:
74+
In `pubspec.yaml` file > Add essential packages in `dependencies`, and packages that a developer need in `dev_dependencies`.
75+
76+
To automatically upgrade your package dependencies to the latest versions consider running
77+
```
78+
flutter pub upgrade --major-versions
79+
```
80+
81+
To see which dependencies have newer versions available, run
82+
```
83+
flutter pub outdated
84+
```
85+
<hr />
86+
87+
## Project structure and coding conventions:
88+
89+
### [Official dart conventions](https://dart.dev/guides/language/effective-dart/style)
90+
91+
- 2 spaces for indentation
92+
- test files have `_test.ext` suffix in the file name > example `widget_test.dart`
93+
- Libraries, packages, directories, and source files name convention: snake_case(lowercase_with_underscores).
94+
- Classes, Enums, Typedefs, and extensions naming convention: UpperCamelCase.
95+
- Variables, constants, parameters naming convention: lowerCamelCase.
96+
- Method/ functions naming convention: lowerCamelCase.
97+
- Use relative path
98+
- ✘ `import 'package:demo/home.dart';` → This should be avoided.
99+
- ✔ `import './home.dart';` → Correct way
100+
- to fix imports you can use [dart-import](https://marketplace.visualstudio.com/items?itemName=luanpotter.dart-import)
101+
- Avoid using as instead, use is operator
102+
- Avoid print()/ debugPrint() calls
103+
104+
Android Production
105+
- universal package: `com.webreinvent.vaahflutter`
106+
107+
iOS Production
108+
- universal package: `com.webreinvent.vaahflutter`

analysis_options.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at
17+
# https://dart-lang.github.io/linter/lints/index.html.
18+
#
19+
# Instead of disabling a lint rule for the entire project in the
20+
# section below, it can also be suppressed for a single line of code
21+
# or a specific dart file by using the `// ignore: name_of_lint` and
22+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23+
# producing the lint.
24+
rules:
25+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27+
28+
# Additional information about this file can be found at
29+
# https://dart.dev/guides/language/analysis-options

android/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties
12+
**/*.keystore
13+
**/*.jks

android/app/build.gradle

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
def localProperties = new Properties()
2+
def localPropertiesFile = rootProject.file('local.properties')
3+
if (localPropertiesFile.exists()) {
4+
localPropertiesFile.withReader('UTF-8') { reader ->
5+
localProperties.load(reader)
6+
}
7+
}
8+
9+
def flutterRoot = localProperties.getProperty('flutter.sdk')
10+
if (flutterRoot == null) {
11+
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12+
}
13+
14+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15+
if (flutterVersionCode == null) {
16+
flutterVersionCode = '1'
17+
}
18+
19+
def flutterVersionName = localProperties.getProperty('flutter.versionName')
20+
if (flutterVersionName == null) {
21+
flutterVersionName = '1.0'
22+
}
23+
24+
apply plugin: 'com.android.application'
25+
apply plugin: 'kotlin-android'
26+
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27+
28+
android {
29+
compileSdkVersion 33
30+
ndkVersion flutter.ndkVersion
31+
32+
compileOptions {
33+
sourceCompatibility JavaVersion.VERSION_1_8
34+
targetCompatibility JavaVersion.VERSION_1_8
35+
}
36+
37+
kotlinOptions {
38+
jvmTarget = '1.8'
39+
}
40+
41+
sourceSets {
42+
main.java.srcDirs += 'src/main/kotlin'
43+
}
44+
45+
defaultConfig {
46+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
47+
applicationId "com.webreinvent.vaahflutter"
48+
// You can update the following values to match your application needs.
49+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
50+
minSdkVersion 19
51+
targetSdkVersion flutter.targetSdkVersion
52+
versionCode flutterVersionCode.toInteger()
53+
versionName flutterVersionName
54+
}
55+
56+
buildTypes {
57+
release {
58+
// TODO: Add your own signing config for the release build.
59+
// Signing with the debug keys for now, so `flutter run --release` works.
60+
signingConfig signingConfigs.debug
61+
}
62+
}
63+
}
64+
65+
flutter {
66+
source '../..'
67+
}
68+
69+
dependencies {
70+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
71+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.webreinvent.vaahflutter">
3+
<!-- The INTERNET permission is required for development. Specifically,
4+
the Flutter tool needs it to communicate with the running application
5+
to allow setting breakpoints, to provide hot reload, etc.
6+
-->
7+
<uses-permission android:name="android.permission.INTERNET"/>
8+
</manifest>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.webreinvent.vaahflutter">
3+
<application
4+
android:label="VaahFlutter"
5+
android:name="${applicationName}"
6+
android:icon="@mipmap/launcher_icon">
7+
<activity
8+
android:name=".MainActivity"
9+
android:exported="true"
10+
android:launchMode="singleTop"
11+
android:theme="@style/LaunchTheme"
12+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
13+
android:hardwareAccelerated="true"
14+
android:windowSoftInputMode="adjustResize">
15+
<!-- Specifies an Android theme to apply to this Activity as soon as
16+
the Android process has started. This theme is visible to the user
17+
while the Flutter UI initializes. After that, this theme continues
18+
to determine the Window background behind the Flutter UI. -->
19+
<meta-data
20+
android:name="io.flutter.embedding.android.NormalTheme"
21+
android:resource="@style/NormalTheme"
22+
/>
23+
<intent-filter>
24+
<action android:name="android.intent.action.MAIN"/>
25+
<category android:name="android.intent.category.LAUNCHER"/>
26+
</intent-filter>
27+
<intent-filter android:autoVerify="true">
28+
<action android:name="android.intent.action.VIEW"/>
29+
<category android:name="android.intent.category.DEFAULT"/>
30+
<category android:name="android.intent.category.BROWSABLE"/>
31+
<data android:host="YOUR_FIREBASE_APP_DYNAMIC_LINK_PREFIX.page.link" android:scheme="https"/>
32+
</intent-filter>
33+
</activity>
34+
<!-- Don't delete the meta-data below.
35+
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
36+
<meta-data
37+
android:name="flutterEmbedding"
38+
android:value="2" />
39+
</application>
40+
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
41+
</manifest>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Generated file.
2+
//
3+
// If you wish to remove Flutter's multidex support, delete this entire file.
4+
//
5+
// Modifications to this file should be done in a copy under a different name
6+
// as this file may be regenerated.
7+
8+
package io.flutter.app;
9+
10+
import android.app.Application;
11+
import android.content.Context;
12+
import androidx.annotation.CallSuper;
13+
import androidx.multidex.MultiDex;
14+
15+
/**
16+
* Extension of {@link android.app.Application}, adding multidex support.
17+
*/
18+
public class FlutterMultiDexApplication extends Application {
19+
@Override
20+
@CallSuper
21+
protected void attachBaseContext(Context base) {
22+
super.attachBaseContext(base);
23+
MultiDex.install(this);
24+
}
25+
}

0 commit comments

Comments
 (0)