upgrade flutter

This commit is contained in:
2025-02-11 22:11:45 +06:30
parent 4607c34879
commit 69361f8445
29 changed files with 498 additions and 713 deletions

29
.gitignore vendored
View File

@@ -5,9 +5,12 @@
*.swp *.swp
.DS_Store .DS_Store
.atom/ .atom/
.build/
.buildlog/ .buildlog/
.history .history
.svn/ .svn/
.swiftpm/
migrate_working_dir/
# IntelliJ related # IntelliJ related
*.iml *.iml
@@ -22,38 +25,24 @@
# Flutter/Dart/Pub related # Flutter/Dart/Pub related
**/doc/api/ **/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/ .dart_tool/
.flutter-plugins .flutter-plugins
.flutter-plugins-dependencies .flutter-plugins-dependencies
.packages
.pub-cache/ .pub-cache/
.pub/ .pub/
/build/ /build/
# Web related
lib/generated_plugin_registrant.dart
# Symbolication related # Symbolication related
app.*.symbols app.*.symbols
# Obfuscation related # Obfuscation related
app.*.map.json app.*.map.json
# Exceptions to above rules. # Android Studio will place build artifacts here
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages /android/app/debug
android/key.properties /android/app/profile
android/key.jks /android/app/release
android/app/src/prod/google-services.json
.gradle/5.6.2/gc.properties
.gradle/5.6.2/executionHistory/executionHistory.bin
.gradle/5.6.2/executionHistory/executionHistory.lock
.gradle/5.6.2/fileChanges/last-build.bin
.gradle/5.6.2/fileHashes/fileHashes.lock
.gradle/buildOutputCleanup/buildOutputCleanup.lock
.gradle/buildOutputCleanup/cache.properties
.gradle/vcs-1/gc.properties
android/key.keystore
android/dev-key.properties android/dev-key.properties
ios/Runner/GoogleService-Info.plist android/app/src/dev/google-services.json
android/app/google-services.json android/app/google-services.json
ios/Runner/GoogleService-Info.plist

View File

@@ -4,7 +4,42 @@
# This file should be version controlled and should not be manually edited. # This file should be version controlled and should not be manually edited.
version: version:
revision: f4abaa0735eba4dfd8f33f73363911d63931fe03 revision: "d8a9f9a52e5af486f80d932e838ee93861ffd863"
channel: stable channel: "stable"
project_type: app project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863
base_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863
- platform: android
create_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863
base_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863
- platform: ios
create_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863
base_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863
- platform: linux
create_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863
base_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863
- platform: macos
create_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863
base_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863
- platform: web
create_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863
base_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863
- platform: windows
create_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863
base_revision: d8a9f9a52e5af486f80d932e838ee93861ffd863
# 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'

View File

@@ -8,9 +8,9 @@ This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project: A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter, view our For help getting started with Flutter development, view the
[online documentation](https://flutter.dev/docs), which offers tutorials, [online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference. samples, guidance on mobile development, and a full API reference.

28
analysis_options.yaml Normal file
View File

@@ -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

4
android/.gitignore vendored
View File

@@ -7,5 +7,7 @@ gradle-wrapper.jar
GeneratedPluginRegistrant.java GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore. # Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app # See https://flutter.dev/to/reference-keystore
key.properties key.properties
**/*.keystore
**/*.jks

View File

@@ -1,85 +1,49 @@
plugins { plugins {
id "com.android.application" id "com.android.application"
// START: FlutterFire Configuration
id 'com.google.gms.google-services'
// END: FlutterFire Configuration
id "kotlin-android" id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin" 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 flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
def keystoreProperties = new Properties() def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties') def keystorePropertiesFile = rootProject.file('dev-key.properties')
if (keystorePropertiesFile.exists()) { if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
} }
android { android {
namespace = "com.mokkon.fcs.fcs" namespace = "com.example.fcs"
compileSdkVersion 34 compileSdk = 35
ndkVersion = "27.0.12077973" ndkVersion = flutter.ndkVersion
compileOptions { compileOptions {
sourceCompatibility = JavaVersion.VERSION_17 sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_1_8
coreLibraryDesugaringEnabled true
} }
kotlinOptions { kotlinOptions {
jvmTarget = 17 jvmTarget = JavaVersion.VERSION_1_8
}
lintOptions {
checkReleaseBuilds false
} }
defaultConfig { defaultConfig {
applicationId = "com.example.fcs"
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 34 targetSdkVersion 35
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
} }
flavorDimensions "fcs" flavorDimensions "fcs"
productFlavors { productFlavors {
prod { prod {
dimension "fcs" dimension "fcs"
applicationId "com.mokkon.fcs" applicationId "com.mokkon.fcs"
versionCode flutterVersionCode.toInteger() versionCode = flutter.versionCode
versionName flutterVersionName versionName = flutter.versionName
} }
dev { dev {
dimension "fcs" dimension "fcs"
applicationId "com.mokkon.fcs.dev" applicationId "com.mokkon.fcs.dev"
versionCode flutterVersionCode.toInteger() versionCode = flutter.versionCode
versionName flutterVersionName versionName = flutter.versionName
} }
} }
@@ -95,7 +59,6 @@ android {
buildTypes { buildTypes {
release { release {
signingConfig signingConfigs.release signingConfig signingConfigs.release
minifyEnabled true minifyEnabled true
// useProguard false // useProguard false
@@ -103,11 +66,7 @@ android {
applicationVariants.all { variant -> applicationVariants.all { variant ->
variant.outputs.all { variant.outputs.all {
def newName def newName
// if (buildType == 'debug'){ newName = "${variant.productFlavors[0].dimension}_${variant.productFlavors[0].name}_v${variant.productFlavors[0].versionName}+${variant.productFlavors[0].versionCode}.apk"
// newName = "app-${variant.getFlavorName()}-debug.apk"
// } else {
newName = "${variant.productFlavors[0].dimension}_${variant.productFlavors[0].name}_v${defaultConfig.versionName}+${defaultConfig.versionCode}.apk"
// }
outputFileName = newName outputFileName = newName
} }
} }
@@ -119,10 +78,6 @@ android {
} }
flutter { flutter {
source '../..' source = "../.."
} }
dependencies {
implementation "androidx.multidex:multidex:2.0.1"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
}

View File

@@ -1,5 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Flutter needs it to communicate with the running application <!-- 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. to allow setting breakpoints, to provide hot reload, etc.
--> -->
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>

View File

@@ -1,38 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application <application
android:name=".Application" android:label="FCS Dev">
android:exported="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:hardwareAccelerated="true"
android:exported="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application> </application>
</manifest> </manifest>

View File

@@ -14,6 +14,30 @@
} }
}, },
"oauth_client": [ "oauth_client": [
{
"client_id": "944560757353-1e5a1qdip1hu3p6531hvf89uf4up5ohk.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.mokkon.fcs.dev",
"certificate_hash": "1f3978310f4c9d4978cd876bcb042c8de833af2d"
}
},
{
"client_id": "944560757353-em1esjsi8o4vdmaqpo2te3f3oruvp7mu.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.mokkon.fcs.dev",
"certificate_hash": "f8b4455e24bbef71ded264dd2a39e76823569ee4"
}
},
{
"client_id": "944560757353-l57he8ni7fck8rkbdqn0f7icn46vmnf3.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.mokkon.fcs.dev",
"certificate_hash": "651c29f96db66a3c6e8889e7db766e96b0d92503"
}
},
{ {
"client_id": "944560757353-n44kricufdgign6ki6eu1fqvh7ppa29m.apps.googleusercontent.com", "client_id": "944560757353-n44kricufdgign6ki6eu1fqvh7ppa29m.apps.googleusercontent.com",
"client_type": 3 "client_type": 3
@@ -30,6 +54,13 @@
{ {
"client_id": "944560757353-n44kricufdgign6ki6eu1fqvh7ppa29m.apps.googleusercontent.com", "client_id": "944560757353-n44kricufdgign6ki6eu1fqvh7ppa29m.apps.googleusercontent.com",
"client_type": 3 "client_type": 3
},
{
"client_id": "944560757353-o6emrja7ad8g8ulbcvvpah9a1tul3s21.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.mokkon.fcs.dev"
}
} }
] ]
} }

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">FCS - Dev</string>
</resources>

View File

@@ -1,14 +1,19 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application <application
android:exported="true" android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/ic_launcher">
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:taskAffinity=""
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:exported="true"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as <!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user the Android process has started. This theme is visible to the user
@@ -18,15 +23,6 @@
android:name="io.flutter.embedding.android.NormalTheme" android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" android:resource="@style/NormalTheme"
/> />
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
@@ -38,4 +34,15 @@
android:name="flutterEmbedding" android:name="flutterEmbedding"
android:value="2" /> android:value="2" />
</application> </application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
</manifest> </manifest>

View File

@@ -1,13 +0,0 @@
package com.mokkon.fcs.fcs;
import io.flutter.app.FlutterApplication;
import io.flutter.plugin.common.PluginRegistry;
import io.flutter.plugins.GeneratedPluginRegistrant;
public class Application extends FlutterApplication {
@Override
public void onCreate() {
super.onCreate();
}
}

View File

@@ -1,6 +0,0 @@
package com.mokkon.fcs.fcs;
import io.flutter.embedding.android.FlutterActivity;
public class MainActivity extends FlutterActivity {
}

View File

@@ -0,0 +1,5 @@
package com.example.fcs
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity()

View File

@@ -1,38 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application <application
android:name=".Application" android:label="FCS Logistics">
android:exported="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:hardwareAccelerated="true"
android:exported="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application> </application>
</manifest> </manifest>

View File

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">FCS Logistics</string>
</resources>

View File

@@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android">
package="com.mokkon.fcs.fcs"> <!-- The INTERNET permission is required for development. Specifically,
<!-- Flutter needs it to communicate with the running application the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>

View File

@@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx2536M org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true

View File

@@ -1,6 +1,5 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip

View File

@@ -18,11 +18,11 @@ pluginManagement {
plugins { plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.3.2" apply false id "com.android.application" version "8.1.0" apply false
// START: FlutterFire Configuration // START: FlutterFire Configuration
id "com.google.gms.google-services" version "4.3.15" apply false id "com.google.gms.google-services" version "4.3.15" apply false
// END: FlutterFire Configuration // END: FlutterFire Configuration
id "org.jetbrains.kotlin.android" version "2.0.20" apply false id "org.jetbrains.kotlin.android" version "1.8.22" apply false
} }
include ":app" include ":app"

View File

@@ -1 +0,0 @@
include ':app'

View File

@@ -1 +1 @@
{"flutter":{"platforms":{"android":{"default":{"projectId":"fcs-dev1","appId":"1:944560757353:android:d21ae04e44e82f10fa60f8","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"fcs-dev1","appId":"1:944560757353:ios:de037244faea4173fa60f8","uploadDebugSymbols":false,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"fcs-dev1","configurations":{"android":"1:944560757353:android:d21ae04e44e82f10fa60f8","ios":"1:944560757353:ios:de037244faea4173fa60f8"}}}}}} {"flutter":{"platforms":{"android":{"default":{"projectId":"fcs-dev1","appId":"1:944560757353:android:d21ae04e44e82f10fa60f8","fileOutput":"android/app/google-services.json"}},"dart":{"lib/firebase_options.dart":{"projectId":"fcs-dev1","configurations":{"android":"1:944560757353:android:d21ae04e44e82f10fa60f8","ios":"1:944560757353:ios:de037244faea4173fa60f8"}}}}}}

View File

@@ -69,4 +69,5 @@ class DefaultFirebaseOptions {
iosClientId: '944560757353-o6emrja7ad8g8ulbcvvpah9a1tul3s21.apps.googleusercontent.com', iosClientId: '944560757353-o6emrja7ad8g8ulbcvvpah9a1tul3s21.apps.googleusercontent.com',
iosBundleId: 'com.mokkon.fcs.dev', iosBundleId: 'com.mokkon.fcs.dev',
); );
} }

View File

@@ -111,7 +111,7 @@ class _InitialLanguageSelectionPageState
child: CircleAvatar( child: CircleAvatar(
radius: 20, radius: 20,
backgroundImage: AssetImage( backgroundImage: AssetImage(
"icons/flags/png/gb.png", "icons/flags/png100px/gb.png",
package: 'country_icons', package: 'country_icons',
), ),
), ),
@@ -120,7 +120,7 @@ class _InitialLanguageSelectionPageState
child: CircleAvatar( child: CircleAvatar(
radius: 20, radius: 20,
backgroundImage: AssetImage( backgroundImage: AssetImage(
"icons/flags/png/mm.png", "icons/flags/png100px/mm.png",
package: 'country_icons', package: 'country_icons',
), ),
), ),
@@ -192,7 +192,8 @@ class _InitialLanguageSelectionPageState
bool isLogin = Provider.of<MainModel>(context, listen: false).isLogin(); bool isLogin = Provider.of<MainModel>(context, listen: false).isLogin();
String page = isLogin ? "/home" : "/welcome"; String page = isLogin ? "/home" : "/welcome";
Navigator.of(context).pushReplacementNamed(page); Navigator.of(context).pushReplacementNamed(page);
} catch (e) {} finally { } catch (e) {
} finally {
setState(() { setState(() {
_isLoading = false; _isLoading = false;
}); });

View File

@@ -66,13 +66,13 @@ class _WelcomePageState extends State<WelcomePage> {
ToggleButtons( ToggleButtons(
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'icons/flags/png/us.png', 'icons/flags/png100px/us.png',
package: 'country_icons', package: 'country_icons',
fit: BoxFit.fitWidth, fit: BoxFit.fitWidth,
width: 25, width: 25,
), ),
Image.asset( Image.asset(
'icons/flags/png/mm.png', 'icons/flags/png100px/mm.png',
package: 'country_icons', package: 'country_icons',
fit: BoxFit.fitWidth, fit: BoxFit.fitWidth,
width: 25, width: 25,

View File

@@ -178,7 +178,9 @@ class _ProfileState extends State<Profile> {
iconData: Icons.email_outlined, iconData: Icons.email_outlined,
), ),
), ),
IconButton(icon: Icon(Icons.edit, color: Colors.grey), onPressed: () { IconButton(
icon: Icon(Icons.edit, color: Colors.grey),
onPressed: () {
Navigator.of(context, rootNavigator: true).push( Navigator.of(context, rootNavigator: true).push(
CupertinoPageRoute( CupertinoPageRoute(
builder: (context) => AddRecoveryEmail(user: user))); builder: (context) => AddRecoveryEmail(user: user)));
@@ -275,13 +277,13 @@ class _ProfileState extends State<Profile> {
children: [ children: [
isEng isEng
? Image.asset( ? Image.asset(
'icons/flags/png/us.png', 'icons/flags/png100px/us.png',
package: 'country_icons', package: 'country_icons',
fit: BoxFit.fitWidth, fit: BoxFit.fitWidth,
width: 25, width: 25,
) )
: Image.asset( : Image.asset(
'icons/flags/png/mm.png', 'icons/flags/png100px/mm.png',
package: 'country_icons', package: 'country_icons',
fit: BoxFit.fitWidth, fit: BoxFit.fitWidth,
width: 25, width: 25,

View File

@@ -4,48 +4,75 @@ import 'package:fcs/helpers/theme.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_vector_icons/flutter_vector_icons.dart'; import 'package:flutter_vector_icons/flutter_vector_icons.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:timeline_list/timeline.dart'; import 'package:timeline_list/timeline_list.dart';
import 'package:timeline_list/timeline_model.dart';
var dateFormatter = new DateFormat('dd MMM yyyy'); var dateFormatter = DateFormat('dd MMM yyyy');
class StatusTree extends StatelessWidget { class StatusTree extends StatelessWidget {
final List<ShipmentStatus>? shipmentHistory; final List<ShipmentStatus>? shipmentHistory;
final String? currentStatus; final String? currentStatus;
const StatusTree({Key? key, this.shipmentHistory, this.currentStatus}) const StatusTree({super.key, this.shipmentHistory, this.currentStatus});
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ExpansionTile( bool isPacked = currentStatus != package_received_status &&
initiallyExpanded: true, currentStatus != package_processed_status;
shape: var receivedIcon = Container(
Border.symmetric(horizontal: BorderSide(color: Colors.grey.shade300)), width: 25,
title: Text( height: 25,
decoration: BoxDecoration(shape: BoxShape.circle, color: Colors.green),
child: Icon(MaterialCommunityIcons.inbox_arrow_down,
color: Colors.white, size: 18));
var processedIcon = Container(
width: 25,
height: 25,
decoration: BoxDecoration(shape: BoxShape.circle, color: Colors.green),
child: Icon(FontAwesome.dropbox, color: Colors.white, size: 18));
var packedIcon = Container(
width: 25,
height: 25,
decoration: BoxDecoration(shape: BoxShape.circle, color: Colors.green),
child: Icon(MaterialCommunityIcons.package,
color: Colors.white, size: 18));
var shippedIcon = Container(
width: 25,
height: 25,
decoration: BoxDecoration(shape: BoxShape.circle, color: Colors.green),
child: Icon(Ionicons.ios_airplane, color: Colors.white, size: 18));
var deliveredIcon = Container(
width: 25,
height: 25,
decoration: BoxDecoration(shape: BoxShape.circle, color: Colors.green),
child: Icon(MaterialCommunityIcons.truck_fast,
color: Colors.white, size: 18));
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'Status', 'Status',
style: TextStyle(color: primaryColor, fontWeight: FontWeight.bold), style: TextStyle(color: primaryColor, fontWeight: FontWeight.bold),
), ),
children: <Widget>[
Container( Container(
padding: EdgeInsets.only(left: 20), child: Timeline.builder(
height: 400, shrinkWrap: true,
child: Timeline(children: _models(), position: TimelinePosition.Left), context: context,
) markerCount: shipmentHistory?.length ?? 0,
], physics: NeverScrollableScrollPhysics(),
); properties: TimelineProperties(
} iconAlignment: MarkerIconAlignment.center,
iconSize: 25,
List<TimelineModel> _models() { timelinePosition: TimelinePosition.start),
if (shipmentHistory == null || currentStatus == null) return []; markerBuilder: (context, index) {
bool isPacked = currentStatus != package_received_status && ShipmentStatus? e = shipmentHistory?[index];
currentStatus != package_processed_status; return Marker(
return shipmentHistory! child: SizedBox(
.map((e) => TimelineModel( width: 250,
Padding(
padding: const EdgeInsets.all(18.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: e == null
? []
: <Widget>[
Text(e.status, Text(e.status,
style: TextStyle( style: TextStyle(
color: e.done! ? primaryColor : Colors.grey, color: e.done! ? primaryColor : Colors.grey,
@@ -54,23 +81,29 @@ class StatusTree extends StatelessWidget {
e.done! || isPacked e.done! || isPacked
? Text(dateFormatter.format(e.date)) ? Text(dateFormatter.format(e.date))
: Container(), : Container(),
e.staffName == null ? Container() : Text(e.staffName!) e.staffName == null
? Container()
: Text(e.staffName!)
], ],
), ),
), ),
iconBackground: e.done! ? primaryColor : Colors.grey, icon: e == null
icon: Icon( ? null
e.status == "shipped" : e.status == "shipped"
? Ionicons.ios_airplane ? shippedIcon
: e.status == "delivered" : e.status == "delivered"
? MaterialCommunityIcons.truck_fast ? deliveredIcon
: e.status == "packed" : e.status == "packed"
? MaterialCommunityIcons.package ? packedIcon
: e.status == "processed" : e.status == "processed"
? FontAwesome.dropbox ? processedIcon
: MaterialCommunityIcons.inbox_arrow_down, : receivedIcon,
color: Colors.white, position: MarkerPosition.left,
))) );
.toList(); },
),
)
],
);
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,10 @@
name: fcs name: fcs
description: FCS Logistics description: FCS Logistics
publish_to: 'none' publish_to: 'none'
version: 1.1.1+13 version: 1.1.2+14
environment: environment:
sdk: '>=3.0.6 <4.0.0' sdk: ^3.6.2
dependencies: dependencies:
flutter: flutter:
@@ -12,58 +12,67 @@ dependencies:
flutter_localizations: flutter_localizations:
sdk: flutter sdk: flutter
cupertino_icons: ^1.0.3 cupertino_icons: ^1.0.8
firebase_core: ^3.6.0
firebase_auth: ^5.3.1
cloud_firestore: ^5.4.4
firebase_storage: ^12.3.2
firebase_messaging: ^15.1.3
provider: ^6.0.0
image_picker: ^1.0.6
shared_preferences: ^2.0.7
progress: progress:
path: path:
../mokkon-flutter/packages/progress ../mokkon-flutter/packages/progress
flutter_datetime_picker: ^1.5.1
dio: ^5.4.0 # dart.dev
package_info_plus: ^8.0.2
google_api_availability: ^5.0.0
intl: ^0.19.0 intl: ^0.19.0
font_awesome_flutter: ^10.6.0 logging: ^1.3.0
photo_view: ^0.14.0
uuid: ^4.2.2 # flutter.dev
# zefyrka: ^1.0.10 path_provider: ^2.1.5
path_provider: ^2.0.2 camera: ^0.11.1
camera: ^0.10.5+8 url_launcher: ^6.3.1
url_launcher: ^6.0.9 image_picker: ^1.1.2
device_info_plus: ^9.1.1 shared_preferences: ^2.5.2
connectivity_plus: ^6.1.0 flutter_markdown: ^0.7.6+2
logging: ^1.0.1
permission_handler: ^11.1.0 # firebase.google.com
pin_input_text_field: ^4.1.0 firebase_core: ^3.11.0
firebase_auth: ^5.4.2
cloud_firestore: ^5.6.3
firebase_storage: ^12.4.2
firebase_messaging: ^15.2.2
# flutter.cn
dio: ^5.8.0+1
# fluttercommunity.dev
font_awesome_flutter: ^10.8.0
connectivity_plus: ^6.1.3
package_info_plus: ^8.2.1
device_info_plus: ^11.3.0
share_plus: ^10.1.4
# third parties
provider: ^6.1.2
flutter_datetime_picker_plus: ^2.2.0
photo_view: ^0.15.0
uuid: ^4.5.1
permission_handler: ^11.3.1
pin_input_text_field: ^4.5.2
flutter_icons_null_safety: ^1.1.0 flutter_icons_null_safety: ^1.1.0
country_icons: ^2.0.2
timeline_list: ^0.0.5
barcode_scan2: ^4.1.4
flutter_pdfview: ^1.2.1
flutter_local_notifications: ^17.2.3
share_plus: ^10.1.3
cached_network_image: ^3.3.1
flutter_cache_manager: ^3.1.2
flutter_vector_icons: ^2.0.0 flutter_vector_icons: ^2.0.0
open_file: ^3.3.2 flutter_cache_manager: ^3.4.1
pdf: ^3.10.8 open_file: ^3.5.10
pdf: ^3.11.2
flutter_slidable: ^4.0.0
qr_flutter: ^4.1.0 qr_flutter: ^4.1.0
flutter_markdown: ^0.6.20+1 country_picker: ^2.0.27
flutter_slidable: ^3.1.1 barcode_scan2: ^4.4.0
country_picker: ^2.0.26 cached_network_image: ^3.4.1
flutter_pdfview: ^1.4.0
timeline_list: ^0.1.1
country_icons: ^3.0.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
test: ^1.15.7
flutter_lints: ^5.0.0
flutter: flutter:
uses-material-design: true uses-material-design: true