@ -0,0 +1,44 @@
|
||||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
migrate_working_dir/
|
||||
|
||||
# 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/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.packages
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Android Studio will place build artifacts here
|
||||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
@ -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.
|
||||
|
||||
version:
|
||||
revision: 135454af32477f815a7525073027a3ff9eff1bfd
|
||||
channel: stable
|
||||
|
||||
project_type: app
|
||||
|
||||
# Tracks metadata for the flutter migrate command
|
||||
migration:
|
||||
platforms:
|
||||
- platform: root
|
||||
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
|
||||
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
|
||||
- platform: android
|
||||
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
|
||||
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
|
||||
- platform: ios
|
||||
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
|
||||
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
|
||||
- platform: linux
|
||||
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
|
||||
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
|
||||
- platform: macos
|
||||
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
|
||||
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
|
||||
- platform: web
|
||||
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
|
||||
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
|
||||
- platform: windows
|
||||
create_revision: 135454af32477f815a7525073027a3ff9eff1bfd
|
||||
base_revision: 135454af32477f815a7525073027a3ff9eff1bfd
|
||||
|
||||
# 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'
|
@ -0,0 +1,16 @@
|
||||
# watermanagement_supplier
|
||||
|
||||
A new Flutter project.
|
||||
|
||||
## Getting Started
|
||||
|
||||
This project is a starting point for a Flutter application.
|
||||
|
||||
A few resources to get you started if this is your first Flutter project:
|
||||
|
||||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
||||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
|
||||
|
||||
For help getting started with Flutter development, view the
|
||||
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
||||
samples, guidance on mobile development, and a full API reference.
|
@ -0,0 +1,29 @@
|
||||
# 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-lang.github.io/linter/lints/index.html.
|
||||
#
|
||||
# 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
|
@ -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
|
@ -0,0 +1,72 @@
|
||||
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'
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 33
|
||||
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 {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "com.arminta.supplier.watermanagement_supplier"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
|
||||
minSdkVersion 28
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source '../..'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.arminta.supplier.watermanagement_supplier">
|
||||
<!-- 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>
|
@ -0,0 +1,55 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.arminta.supplier.watermanagement_supplier">
|
||||
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
|
||||
<!-- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />-->
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
||||
<uses-permission android:name="android.permission.CALL_PHONE" />
|
||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="https" />
|
||||
</intent>
|
||||
</queries>
|
||||
|
||||
<application
|
||||
android:label="supplier"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_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" />
|
||||
<meta-data android:name="com.google.android.geo.API_KEY"
|
||||
android:value="AIzaSyDJpK9RVhlBejtJu9xSGfneuTN6HOfJgSM"/>
|
||||
</application>
|
||||
</manifest>
|
@ -0,0 +1,6 @@
|
||||
package com.arminta.supplier.watermanagement_supplier
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 8.7 KiB |
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
@ -0,0 +1,8 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.arminta.supplier.watermanagement_supplier">
|
||||
<!-- 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>
|
@ -0,0 +1,31 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.6.10'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.1.2'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = '../build'
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
}
|
||||
subprojects {
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
@ -0,0 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
|
@ -0,0 +1,11 @@
|
||||
include ':app'
|
||||
|
||||
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
|
||||
def properties = new Properties()
|
||||
|
||||
assert localPropertiesFile.exists()
|
||||
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
|
||||
|
||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 678 B |
After Width: | Height: | Size: 932 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 957 B |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 246 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 924 B |
After Width: | Height: | Size: 127 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 46 KiB |
@ -0,0 +1,34 @@
|
||||
**/dgph
|
||||
*.mode1v3
|
||||
*.mode2v3
|
||||
*.moved-aside
|
||||
*.pbxuser
|
||||
*.perspectivev3
|
||||
**/*sync/
|
||||
.sconsign.dblite
|
||||
.tags*
|
||||
**/.vagrant/
|
||||
**/DerivedData/
|
||||
Icon?
|
||||
**/Pods/
|
||||
**/.symlinks/
|
||||
profile
|
||||
xcuserdata
|
||||
**/.generated/
|
||||
Flutter/App.framework
|
||||
Flutter/Flutter.framework
|
||||
Flutter/Flutter.podspec
|
||||
Flutter/Generated.xcconfig
|
||||
Flutter/ephemeral/
|
||||
Flutter/app.flx
|
||||
Flutter/app.zip
|
||||
Flutter/flutter_assets/
|
||||
Flutter/flutter_export_environment.sh
|
||||
ServiceDefinitions.json
|
||||
Runner/GeneratedPluginRegistrant.*
|
||||
|
||||
# Exceptions to above rules.
|
||||
!default.mode1v3
|
||||
!default.mode2v3
|
||||
!default.pbxuser
|
||||
!default.perspectivev3
|
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>11.0</string>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1 @@
|
||||
#include "Generated.xcconfig"
|
@ -0,0 +1 @@
|
||||
#include "Generated.xcconfig"
|
@ -0,0 +1,481 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||
);
|
||||
name = Flutter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146E51CF9000F007C117D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146EF1CF9000F007C117D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
97C147021CF9000F007C117D /* Info.plist */,
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
||||
);
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1300;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
97C146ED1CF9000F007C117D = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
LastSwiftMigration = 1100;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 97C146E51CF9000F007C117D;
|
||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
97C146ED1CF9000F007C117D /* Runner */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Thin Binary";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C146FB1CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C147001CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.arminta.supplier.watermanagementSupplier;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
97C147031CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147041CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
97C147061CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.arminta.supplier.watermanagementSupplier;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147071CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.arminta.supplier.watermanagementSupplier;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147031CF9000F007C117D /* Debug */,
|
||||
97C147041CF9000F007C117D /* Release */,
|
||||
249021D3217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147061CF9000F007C117D /* Debug */,
|
||||
97C147071CF9000F007C117D /* Release */,
|
||||
249021D4217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1300"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,13 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
|
||||
@UIApplicationMain
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
}
|
@ -0,0 +1,122 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 531 B |
After Width: | Height: | Size: 979 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 745 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 979 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 3.7 KiB |
@ -0,0 +1,23 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 68 B |
After Width: | Height: | Size: 68 B |
After Width: | Height: | Size: 68 B |
@ -0,0 +1,5 @@
|
||||
# Launch Screen Assets
|
||||
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||
|
||||
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
|
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
</resources>
|
||||
</document>
|
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Flutter View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Watermanagement Supplier</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>watermanagement_supplier</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1 @@
|
||||
#import "GeneratedPluginRegistrant.h"
|
@ -0,0 +1,404 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'package:watermanagement/dashboard.dart';
|
||||
import 'package:watermanagement/google_maps_place_picker_mb/google_maps_place_picker.dart';
|
||||
import 'package:watermanagement/keys.dart';
|
||||
import 'package:watermanagement/settings.dart';
|
||||
import 'login.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
import 'package:geocoding/geocoding.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'dart:io' show File, Platform;
|
||||
import 'package:google_maps_flutter_android/google_maps_flutter_android.dart';
|
||||
import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart';
|
||||
import 'package:location/location.dart' as locationmap;
|
||||
import 'google_maps_place_picker_mb/src/models/pick_result.dart';
|
||||
import 'google_maps_place_picker_mb/src/place_picker.dart';
|
||||
|
||||
class Deliverboy extends StatefulWidget {
|
||||
const Deliverboy({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<Deliverboy> createState() => _deliverboyState();
|
||||
}
|
||||
|
||||
class _deliverboyState extends State<Deliverboy> {
|
||||
|
||||
|
||||
TextEditingController deliverNameController = TextEditingController();
|
||||
TextEditingController deliveryPhoneNumberController = TextEditingController();
|
||||
TextEditingController deliveryAlternativePhoneNumberController = TextEditingController();
|
||||
TextEditingController deliveryAddressCapturingController = TextEditingController();
|
||||
|
||||
|
||||
String _currentAddress ='';
|
||||
String address1 = '';
|
||||
String address2 = '';
|
||||
String city = '';
|
||||
String state = '';
|
||||
String zip = '';
|
||||
String status = '';
|
||||
|
||||
PickResult? selectedPlace;
|
||||
|
||||
bool _mapsInitialized = false;
|
||||
final String _mapsRenderer = "latest";
|
||||
|
||||
var kInitialPosition = const LatLng(15.462477, 78.717401);
|
||||
|
||||
locationmap.Location location = locationmap.Location();
|
||||
|
||||
final GoogleMapsFlutterPlatform mapsImplementation =
|
||||
GoogleMapsFlutterPlatform.instance;
|
||||
|
||||
void initRenderer() {
|
||||
if (_mapsInitialized) return;
|
||||
if (mapsImplementation is GoogleMapsFlutterAndroid) {
|
||||
switch (_mapsRenderer) {
|
||||
case "legacy":
|
||||
(mapsImplementation as GoogleMapsFlutterAndroid)
|
||||
.initializeWithRenderer(AndroidMapRenderer.legacy);
|
||||
break;
|
||||
case "latest":
|
||||
(mapsImplementation as GoogleMapsFlutterAndroid)
|
||||
.initializeWithRenderer(AndroidMapRenderer.latest);
|
||||
break;
|
||||
}
|
||||
}
|
||||
setState(() {
|
||||
_mapsInitialized = true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: SafeArea(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
Container(
|
||||
height: MediaQuery.of(context).size.height * .15,
|
||||
width: double.infinity,
|
||||
child: Image(
|
||||
image: const AssetImage('images/logo.png'),
|
||||
height: MediaQuery.of(context).size.height * .25,
|
||||
)),
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
Container(
|
||||
//padding: const EdgeInsets.fromLTRB(10, 10, 10, 0),
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: TextFormField(
|
||||
cursorColor: greyColor,
|
||||
controller: deliverNameController,
|
||||
textCapitalization: TextCapitalization.characters,
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(
|
||||
Icons.propane_tank,
|
||||
color: greyColor,
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor)),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
labelText: 'Enter deliveryboy name',
|
||||
labelStyle: TextStyle(
|
||||
color: greyColor, //<-- SEE HERE
|
||||
),
|
||||
),
|
||||
), //tanker name
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: TextFormField(
|
||||
cursorColor: greyColor,
|
||||
controller: deliveryPhoneNumberController,
|
||||
keyboardType: TextInputType.number,
|
||||
maxLength: 10,
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(
|
||||
Icons.phone_android,
|
||||
color: greyColor,
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor)),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
labelText: 'Enter phone number',
|
||||
labelStyle: TextStyle(
|
||||
color: greyColor, //<-- SEE HERE
|
||||
),
|
||||
),
|
||||
),
|
||||
), //phone number
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
|
||||
Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: TextFormField(
|
||||
cursorColor: greyColor,
|
||||
controller: deliveryAlternativePhoneNumberController,
|
||||
keyboardType: TextInputType.number,
|
||||
maxLength: 10,
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(
|
||||
Icons.phone_android,
|
||||
color: greyColor,
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor)),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
labelText: 'Enter alternative phone number',
|
||||
labelStyle: TextStyle(
|
||||
color: greyColor, //<-- SEE HERE
|
||||
),
|
||||
),
|
||||
),
|
||||
), //alternative phone number
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
|
||||
|
||||
GestureDetector(
|
||||
child:Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: TextFormField(
|
||||
cursorColor: greyColor,
|
||||
controller: deliveryAddressCapturingController,
|
||||
onTap:()
|
||||
{
|
||||
|
||||
//=============================================================================================
|
||||
location.serviceEnabled().then((value) {
|
||||
if (value) {
|
||||
initRenderer();
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) {
|
||||
return PlacePicker(
|
||||
resizeToAvoidBottomInset: false,
|
||||
hintText: "Find a place ...",
|
||||
searchingText: "Please wait ...",
|
||||
selectText: "Select place",
|
||||
outsideOfPickAreaText: "Place not in area",
|
||||
initialPosition: kInitialPosition,
|
||||
useCurrentLocation: true,
|
||||
selectInitialPosition: true,
|
||||
usePinPointingSearch: true,
|
||||
usePlaceDetailSearch: true,
|
||||
zoomGesturesEnabled: true,
|
||||
zoomControlsEnabled: true,
|
||||
onMapCreated: (GoogleMapController controller) {},
|
||||
onPlacePicked: (PickResult result) {
|
||||
setState(() {
|
||||
selectedPlace = result;
|
||||
if(selectedPlace!.types!.length==1){
|
||||
deliveryAddressCapturingController.text =
|
||||
selectedPlace!.formattedAddress!;
|
||||
}
|
||||
else{
|
||||
deliveryAddressCapturingController.text =selectedPlace!.name!+', '+selectedPlace!.formattedAddress!;
|
||||
}
|
||||
Navigator.of(context).pop();
|
||||
});
|
||||
},
|
||||
onMapTypeChanged: (MapType mapType) {},
|
||||
apiKey: Platform.isAndroid
|
||||
? APIKeys.androidApiKey
|
||||
: APIKeys.iosApiKey,
|
||||
forceAndroidLocationManager: true,
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
} else {
|
||||
showGeneralDialog(
|
||||
context: context,
|
||||
pageBuilder: (context, x, y) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.grey.withOpacity(.5),
|
||||
body: Center(
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 150,
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Text(
|
||||
"Please enable the location",
|
||||
style: TextStyle(
|
||||
fontSize:18,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: const Text("Cancel"),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
//=====================================================================================
|
||||
|
||||
// _getCurrentPosition();
|
||||
},
|
||||
keyboardType: TextInputType.streetAddress,
|
||||
readOnly: false,
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(
|
||||
Icons.location_on_rounded,
|
||||
color: greyColor,
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor)),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
labelText: 'Pic Your office Address',
|
||||
labelStyle: TextStyle(
|
||||
color: greyColor, //<-- SEE HERE
|
||||
),
|
||||
),
|
||||
|
||||
),
|
||||
),
|
||||
/* onTap: ()
|
||||
{
|
||||
},*///address
|
||||
),
|
||||
|
||||
|
||||
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * .99,
|
||||
height: 50,
|
||||
padding: const EdgeInsets.fromLTRB(10, 0, 10, 0),
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: primaryColor, // background
|
||||
onPrimary: Colors.white, // foreground
|
||||
),
|
||||
onPressed: () async {
|
||||
|
||||
if (deliverNameController.text != '' &&
|
||||
deliveryPhoneNumberController.text != ''
|
||||
) {
|
||||
AppSettings.preLoaderDialog(context);
|
||||
|
||||
var payload = new Map<String, dynamic>();
|
||||
payload["Name"] = deliverNameController.text.toString();
|
||||
payload["phone"] = deliveryPhoneNumberController.text.toString();
|
||||
payload["alternativeContactNumber"] = deliveryAlternativePhoneNumberController.text.toString();
|
||||
payload["address"] = deliveryAddressCapturingController.text;
|
||||
payload["city"] = city;
|
||||
payload["state"] = state;
|
||||
payload["zip"] = zip;
|
||||
payload["status"] = status;
|
||||
|
||||
bool deliveryboyStatus = await AppSettings.addDeliverboy(payload);
|
||||
|
||||
try {
|
||||
if (deliveryboyStatus) {
|
||||
|
||||
Navigator.of(context,rootNavigator: true).pop();
|
||||
await Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const Dashboard()),
|
||||
);
|
||||
|
||||
AppSettings.longSuccessToast(
|
||||
"Deliverboy Created Successfully");
|
||||
deliverNameController.text = '';
|
||||
deliveryPhoneNumberController.text = '';
|
||||
deliveryAlternativePhoneNumberController.text = '';
|
||||
/* Navigator.pop(context);
|
||||
await Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => TanksView()),
|
||||
);*/
|
||||
|
||||
//Navigator.of(context).pushNamed('/tanksview');
|
||||
} else {
|
||||
Navigator.of(context,rootNavigator: true).pop();
|
||||
AppSettings.longFailedToast("Deliverboy not Created Successfully");
|
||||
}
|
||||
} catch (exception) {
|
||||
print(exception);
|
||||
}
|
||||
}
|
||||
else {
|
||||
AppSettings.longFailedToast("Please enter valid details");
|
||||
}
|
||||
},
|
||||
|
||||
child: const Text(
|
||||
'Add Deliverboy',
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
),
|
||||
),
|
||||
)),
|
||||
|
||||
],
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,504 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:watermanagement/settings.dart';
|
||||
|
||||
import 'dashboard.dart';
|
||||
|
||||
class AddTankers extends StatefulWidget {
|
||||
const AddTankers({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AddTankers> createState() => _AddTankersState();
|
||||
}
|
||||
|
||||
class _AddTankersState extends State<AddTankers> {
|
||||
|
||||
|
||||
TextEditingController tankerNameController = TextEditingController();
|
||||
TextEditingController tankerPhoneNumberController = TextEditingController();
|
||||
TextEditingController tankerAlternativePhoneNumberController = TextEditingController();
|
||||
TextEditingController tankerDrinkingPriceController = TextEditingController();
|
||||
TextEditingController tankerBorePriceController = TextEditingController();
|
||||
TextEditingController tankerCapacityController = TextEditingController();
|
||||
|
||||
|
||||
bool isCapacityText = false;
|
||||
bool isLoading = false;
|
||||
bool isTankerDataLoading = false;
|
||||
bool isBoreDataLoading = false;
|
||||
bool isGovtPipelineDataLoading = false;
|
||||
|
||||
bool isDrinkingChecked = false;
|
||||
bool isBoreChecked = false;
|
||||
bool isFiveChecked = false;
|
||||
bool isTenChecked = false;
|
||||
bool isFifteenChecked = false;
|
||||
bool isTwentyChecked = false;
|
||||
|
||||
bool isUpdateDrinkingChecked = false;
|
||||
bool isUpdateBoreChecked = false;
|
||||
bool isUpdateFiveChecked = false;
|
||||
|
||||
bool isUpdateTenChecked = false;
|
||||
bool isUpdateFifteenChecked = false;
|
||||
bool isUpdateTwentyChecked = false;
|
||||
|
||||
/*
|
||||
bool isPriceDrinking = false;
|
||||
bool isPriceBore = false;*/
|
||||
|
||||
|
||||
List waterTypes = [];
|
||||
List waterPrice = [];
|
||||
|
||||
List updateWaterTypes = [];
|
||||
|
||||
late TabController _controller;
|
||||
String dropdownTypeOfWater = 'Bore water';
|
||||
String dropdownTypeOfWaterForUpadetBore = 'Bore water';
|
||||
String dropdownTypeOfWaterForTanker = 'Drinking';
|
||||
var typeOfWaterItems = [
|
||||
'Bore water',
|
||||
'Drinking Water',
|
||||
];
|
||||
var typeOfWaterForUpadetBore = [
|
||||
'Bore water',
|
||||
'Drinking Water',
|
||||
];
|
||||
var typeOfWaterItemsForTanker = [
|
||||
'Drinking',
|
||||
'Bore',
|
||||
];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: SafeArea(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
Container(
|
||||
height: MediaQuery.of(context).size.height * .15,
|
||||
width: double.infinity,
|
||||
child: Image(
|
||||
image: const AssetImage('images/logo.png'),
|
||||
height: MediaQuery.of(context).size.height * .25,
|
||||
)),
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
Container(
|
||||
//padding: const EdgeInsets.fromLTRB(10, 10, 10, 0),
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: TextFormField(
|
||||
cursorColor: greyColor,
|
||||
controller: tankerNameController,
|
||||
textCapitalization: TextCapitalization.characters,
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(
|
||||
Icons.propane_tank,
|
||||
color: greyColor,
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor)),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
labelText: 'Enter tanker name',
|
||||
labelStyle: TextStyle(
|
||||
color: greyColor, //<-- SEE HERE
|
||||
),
|
||||
),
|
||||
), //tanker name
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: TextFormField(
|
||||
cursorColor: greyColor,
|
||||
controller: tankerPhoneNumberController,
|
||||
keyboardType: TextInputType.number,
|
||||
maxLength: 10,
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(
|
||||
Icons.phone_android,
|
||||
color: greyColor,
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor)),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
labelText: 'Enter phone number',
|
||||
labelStyle: TextStyle(
|
||||
color: greyColor, //<-- SEE HERE
|
||||
),
|
||||
),
|
||||
),
|
||||
), //phone number
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
|
||||
Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: TextFormField(
|
||||
cursorColor: greyColor,
|
||||
controller: tankerAlternativePhoneNumberController,
|
||||
keyboardType: TextInputType.number,
|
||||
maxLength: 10,
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(
|
||||
Icons.phone_android,
|
||||
color: greyColor,
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor)),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
labelText: 'Enter alternative phone number',
|
||||
labelStyle: TextStyle(
|
||||
color: greyColor, //<-- SEE HERE
|
||||
),
|
||||
),
|
||||
),
|
||||
), //alternative phone number
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Visibility(
|
||||
visible: true,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: TextFormField(
|
||||
onChanged: (value) {
|
||||
if (tankerCapacityController.text != '') {
|
||||
setState(() {
|
||||
isCapacityText = true;
|
||||
});
|
||||
} else {
|
||||
setState(() {
|
||||
isCapacityText = false;
|
||||
});
|
||||
}
|
||||
value = '${AppSettings.formNum(
|
||||
value.replaceAll(',', ''),
|
||||
)}';
|
||||
tankerCapacityController.value = TextEditingValue(
|
||||
text: value,
|
||||
selection: TextSelection.collapsed(
|
||||
offset: value.length,
|
||||
),
|
||||
);
|
||||
},
|
||||
cursorColor: greyColor,
|
||||
controller: tankerCapacityController,
|
||||
keyboardType: TextInputType.number,
|
||||
decoration: InputDecoration(
|
||||
prefixIcon: Icon(
|
||||
Icons.ac_unit_outlined,
|
||||
color: greyColor,
|
||||
),
|
||||
suffix: capacitySuffixText(),
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor)),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
labelText: 'Enter Capacity',
|
||||
labelStyle: TextStyle(
|
||||
color: greyColor, //<-- SEE HERE
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
), //capacity
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Visibility(
|
||||
visible: false, //isCapacityText
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
TextButton(
|
||||
child: const Text(
|
||||
'Add Capacity',
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
decoration: TextDecoration.underline,
|
||||
color: primaryColor),
|
||||
),
|
||||
onPressed: () {
|
||||
// showCapacityDialog();
|
||||
},
|
||||
),
|
||||
/* Text('Add Capacity'),
|
||||
IconButton(
|
||||
iconSize: 20,
|
||||
icon: const Icon(
|
||||
Icons.add,
|
||||
color: primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
showCapacityDialog();
|
||||
},
|
||||
),*/
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.fromLTRB(20, 0, 20, 0),
|
||||
child: Visibility(
|
||||
visible: true,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Choose type of water',
|
||||
style: TextStyle(color: primaryColor,fontSize: 20),
|
||||
),
|
||||
|
||||
SizedBox(height:10),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'Drinking',
|
||||
style: TextStyle(color: Colors.black,fontSize: 20),
|
||||
),
|
||||
Checkbox(
|
||||
checkColor: Colors.white,
|
||||
activeColor: primaryColor,
|
||||
value: isDrinkingChecked,
|
||||
onChanged: (bool? value) {
|
||||
setState(() {
|
||||
isDrinkingChecked = value!;
|
||||
});
|
||||
if (isDrinkingChecked) {
|
||||
|
||||
waterTypes
|
||||
.add({'typeofwater': 'Drinking Water'});
|
||||
// waterPrice.add({'price': tankerDrinkingPriceController.text.toString()});
|
||||
|
||||
} else {
|
||||
|
||||
waterTypes.removeWhere((e) => e['typeofwater'].toString().toUpperCase() == 'DRINKING WATER');
|
||||
// waterPrice.removeWhere((e) => e['price'].toString().toUpperCase() == tankerDrinkingPriceController.text.toString());
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
|
||||
|
||||
Visibility(
|
||||
visible: isDrinkingChecked,
|
||||
child: Container(
|
||||
height: 40,
|
||||
width:200,
|
||||
child:TextFormField(
|
||||
cursorColor: greyColor,
|
||||
controller: tankerDrinkingPriceController,
|
||||
keyboardType: TextInputType.number,
|
||||
/*onSaved: (v){
|
||||
waterPrice.add({'price': v.toString()});
|
||||
},*/
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(
|
||||
Icons.currency_rupee,
|
||||
color: greyColor,
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor)),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
labelText: 'Enter Price',
|
||||
labelStyle: TextStyle(
|
||||
color: greyColor, //<-- SEE HERE
|
||||
),
|
||||
contentPadding: EdgeInsets.all(5),
|
||||
),
|
||||
),
|
||||
|
||||
),
|
||||
)
|
||||
|
||||
],
|
||||
),
|
||||
|
||||
SizedBox(height:10),
|
||||
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'Bore',
|
||||
style: TextStyle(color: Colors.black,fontSize: 20),
|
||||
),
|
||||
SizedBox(width: 35),
|
||||
Checkbox(
|
||||
checkColor: Colors.white,
|
||||
activeColor: primaryColor,
|
||||
value: isBoreChecked,
|
||||
onChanged: (bool? value) {
|
||||
setState(() {
|
||||
isBoreChecked = value!;
|
||||
});
|
||||
if (isBoreChecked) {
|
||||
|
||||
waterTypes
|
||||
.add({'typeofwater': 'Bore Water'});
|
||||
} else {
|
||||
|
||||
waterTypes.removeWhere((e) => e['typeofwater'].toString().toUpperCase() == 'BORE WATER');
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
Visibility(
|
||||
visible: isBoreChecked,
|
||||
child: Container(
|
||||
height: 40,
|
||||
width:200,
|
||||
child:TextFormField(
|
||||
cursorColor: greyColor,
|
||||
controller: tankerBorePriceController,
|
||||
keyboardType: TextInputType.number,
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(
|
||||
Icons.currency_rupee,
|
||||
color: greyColor,
|
||||
),
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor)),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: greyColor),
|
||||
),
|
||||
labelText: 'Enter Price',
|
||||
labelStyle: TextStyle(
|
||||
color: greyColor, //<-- SEE HERE
|
||||
),
|
||||
contentPadding: EdgeInsets.all(5),
|
||||
),
|
||||
),
|
||||
|
||||
),)
|
||||
|
||||
],
|
||||
)
|
||||
],
|
||||
))
|
||||
),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * .99,
|
||||
height: 50,
|
||||
padding: const EdgeInsets.fromLTRB(10, 0, 10, 0),
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: primaryColor, // background
|
||||
onPrimary: Colors.white, // foreground
|
||||
),
|
||||
onPressed: () async{
|
||||
|
||||
if (tankerNameController.text != '' &&
|
||||
tankerPhoneNumberController.text != '' &&
|
||||
tankerAlternativePhoneNumberController.text != '' &&
|
||||
tankerDrinkingPriceController.text != '' &&
|
||||
waterTypes.isNotEmpty) {
|
||||
waterPrice=[];
|
||||
if(isDrinkingChecked){
|
||||
waterPrice.add({'price': tankerDrinkingPriceController.text.toString()});
|
||||
}
|
||||
/*else{
|
||||
waterTypes.removeWhere((e) => e['price'].toString() == tankerDrinkingPriceController.text.toString());
|
||||
}*/
|
||||
|
||||
if(isBoreChecked){
|
||||
waterPrice.add({'price': tankerBorePriceController.text.toString()});
|
||||
}
|
||||
/*else{
|
||||
waterTypes.removeWhere((e) => e['price'].toString() == tankerBorePriceController.text.toString());
|
||||
}*/
|
||||
|
||||
|
||||
var payload = new Map<String, dynamic>();
|
||||
payload["tankerName"] = tankerNameController.text.toString();
|
||||
payload["phoneNumber"] = tankerPhoneNumberController.text.toString();
|
||||
payload["alternative_phoneNumber"] = tankerAlternativePhoneNumberController.text.toString();
|
||||
payload["capacity"] = tankerCapacityController.text.toString();
|
||||
payload["typeofwater"] = waterTypes;
|
||||
payload["price"] = waterPrice;
|
||||
payload["supplier_address"] = '';
|
||||
payload["supplier_name"] = AppSettings.suppliername;
|
||||
|
||||
bool tankStatus = await AppSettings.addTankers(payload);
|
||||
|
||||
try {
|
||||
if (tankStatus) {
|
||||
AppSettings.longSuccessToast(
|
||||
"Tanker Created Successfully");
|
||||
tankerNameController.text = '';
|
||||
tankerPhoneNumberController.text = '';
|
||||
tankerCapacityController.text = '';
|
||||
waterPrice=[];
|
||||
waterTypes=[];
|
||||
await Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const Dashboard()),
|
||||
);
|
||||
|
||||
}
|
||||
else {
|
||||
AppSettings.longFailedToast("Tanker Creation failed");
|
||||
}
|
||||
} catch (exception) {
|
||||
print(exception);
|
||||
}
|
||||
} else {
|
||||
AppSettings.longFailedToast("Please enter valid details");
|
||||
}
|
||||
},
|
||||
child: const Text(
|
||||
'Create Tanker',
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
),
|
||||
),
|
||||
)),
|
||||
|
||||
],
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,458 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:watermanagement/adddeliveryboy.dart';
|
||||
import 'package:watermanagement/addtankers.dart';
|
||||
import 'package:watermanagement/login.dart';
|
||||
import 'package:watermanagement/place_picker.dart';
|
||||
import 'package:watermanagement/settings.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:watermanagement/tanksview.dart';
|
||||
import 'dart:io';
|
||||
|
||||
|
||||
class Dashboard extends StatefulWidget {
|
||||
const Dashboard({super.key});
|
||||
|
||||
@override
|
||||
State<Dashboard> createState() => _DashboardState();
|
||||
}
|
||||
|
||||
class _DashboardState extends State<Dashboard> {
|
||||
int _selectedIndex = 0;
|
||||
|
||||
TextEditingController tankNameController = TextEditingController();
|
||||
TextEditingController blockNameController = TextEditingController();
|
||||
TextEditingController capacityController = TextEditingController();
|
||||
|
||||
|
||||
static const TextStyle optionStyle =
|
||||
TextStyle(fontSize: 30, fontWeight: FontWeight.bold);
|
||||
|
||||
|
||||
final ImagePicker _picker = ImagePicker();
|
||||
|
||||
|
||||
|
||||
/*Future<void> uploadProfileApi(image) async {
|
||||
|
||||
var payload = new Map<String, dynamic>();
|
||||
payload["picture"] = image.toString();
|
||||
var response1= await AppSettings.updateProfilePicture(payload);
|
||||
|
||||
print(response1);
|
||||
}*/
|
||||
|
||||
|
||||
Future pickImageFromGallery() async {
|
||||
try {
|
||||
final image = await _picker.pickImage(source: ImageSource.gallery);
|
||||
if (image == null) return;
|
||||
final imageTemp = File(image.path);
|
||||
setState(() {
|
||||
AppSettings.updatedImage = imageTemp;
|
||||
});
|
||||
// uploadProfileApi(AppSettings.updatedImage);
|
||||
AppSettings.saveProfile(image.path);
|
||||
|
||||
|
||||
} on PlatformException catch (e) {
|
||||
print('Failed to pick image: $e');
|
||||
}
|
||||
}
|
||||
|
||||
Future takeImageFromCamera() async {
|
||||
try {
|
||||
final image = await _picker.pickImage(source: ImageSource.camera);
|
||||
if (image == null) return;
|
||||
final imageTemp = File(image.path);
|
||||
setState(() {
|
||||
AppSettings.updatedImage = imageTemp;
|
||||
});
|
||||
|
||||
//uploadProfileApi(AppSettings.updatedImage);
|
||||
AppSettings.saveProfile(image.path);
|
||||
|
||||
} on PlatformException catch (e) {
|
||||
print('Failed to pick image: $e');
|
||||
}
|
||||
}
|
||||
|
||||
Widget _dashBoard() {
|
||||
|
||||
|
||||
return Container(
|
||||
color: screenBackgroundColor,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
height: MediaQuery.of(context).size.height * .330,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(0),
|
||||
),
|
||||
//color: Colors.red,
|
||||
child: FittedBox(
|
||||
child:Image(
|
||||
image: const AssetImage('images/appbg.png'),
|
||||
|
||||
),
|
||||
fit: BoxFit.fill,
|
||||
)
|
||||
),
|
||||
SizedBox(
|
||||
height: 5
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
showLogoutAlertDialog(context){
|
||||
return showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (BuildContext context) {
|
||||
return StatefulBuilder(
|
||||
builder: (BuildContext context, StateSetter setState) {
|
||||
return AlertDialog(
|
||||
title: const Text('Do you really want to logout?'),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
child: Text('No',style:textButtonStyle()),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
TextButton(
|
||||
child: Text('Yes',style:textButtonStyle()),
|
||||
onPressed: () async{
|
||||
await AppSettings.clearSharedPreferences();
|
||||
await Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => Login()),(Route<dynamic> route) => false,);
|
||||
|
||||
},
|
||||
),
|
||||
]
|
||||
|
||||
);
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
if(_selectedIndex==0){
|
||||
final shouldPop = await showDialog<bool>(context: context, builder: (context) {
|
||||
return AlertDialog(
|
||||
title: const Text('Do you want to exit app?',
|
||||
style: TextStyle(
|
||||
color: primaryColor,
|
||||
fontSize: 20,
|
||||
)),
|
||||
actionsAlignment: MainAxisAlignment.spaceBetween,
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
SystemNavigator.pop();
|
||||
},
|
||||
child: const Text('Yes',
|
||||
style: TextStyle(
|
||||
color: primaryColor,
|
||||
fontSize: 20,
|
||||
)),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(false);
|
||||
},
|
||||
child: const Text('No',
|
||||
style: TextStyle(
|
||||
color: primaryColor,
|
||||
fontSize: 20,
|
||||
)),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
return shouldPop!;
|
||||
}
|
||||
else{
|
||||
setState(() {
|
||||
_selectedIndex=0;
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
child: Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar:AppSettings.appBar('Arminta Water Management'),
|
||||
drawer: Drawer(
|
||||
// Add a ListView to the drawer. This ensures the user can scroll
|
||||
// through the options in the drawer if there isn't enough vertical
|
||||
// space to fit everything.
|
||||
//backgroundColor: screenBackgroundColor,
|
||||
child: ListView(
|
||||
// Important: Remove any padding from the ListView.
|
||||
padding: EdgeInsets.zero,
|
||||
children: [
|
||||
DrawerHeader(
|
||||
decoration: const BoxDecoration(
|
||||
color: primaryColor,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
||||
|
||||
Expanded(child: GestureDetector(
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * .20,
|
||||
height: MediaQuery.of(context).size.height * .15,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
image: DecorationImage(
|
||||
image: (AppSettings.updatedImage != null) ? FileImage(AppSettings.updatedImage!) as ImageProvider : AssetImage("images/profile_pic.png"), // picked file
|
||||
fit: BoxFit.cover)),
|
||||
),
|
||||
onTap: () {
|
||||
showModalBottomSheet<void>(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return SizedBox(
|
||||
height: 200,
|
||||
child: Center(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
GestureDetector(
|
||||
child: Icon(
|
||||
Icons.camera_alt_outlined,
|
||||
size: 100,
|
||||
color: greyColor,
|
||||
),
|
||||
onTap: () async {
|
||||
await takeImageFromCamera();
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
SizedBox(
|
||||
width:
|
||||
MediaQuery.of(context).size.width * .20,
|
||||
),
|
||||
GestureDetector(
|
||||
child: Icon(
|
||||
Icons.photo,
|
||||
size: 100,
|
||||
color: greyColor,
|
||||
),
|
||||
onTap: () async {
|
||||
await pickImageFromGallery();
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
},
|
||||
),),
|
||||
|
||||
Text(
|
||||
AppSettings.suppliername,
|
||||
style: TextStyle(color: Colors.white, fontSize: 15),
|
||||
),
|
||||
Text(
|
||||
AppSettings.phoneNumber,
|
||||
style: TextStyle(color: Colors.white, fontSize: 15),
|
||||
),
|
||||
Text(
|
||||
AppSettings.email,
|
||||
style: TextStyle(color: Colors.white, fontSize: 15),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container()
|
||||
],
|
||||
)),
|
||||
|
||||
ListTile(
|
||||
title: Row(
|
||||
children: const [
|
||||
|
||||
Image(image: const AssetImage('images/ic_launcher.png'),height: 25,width: 25,fit: BoxFit.fill),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Text('Edit Profile',style: TextStyle(color:primaryColor)),
|
||||
],
|
||||
),
|
||||
onTap: () {
|
||||
|
||||
/* Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => UpdateProfile()),
|
||||
);*/
|
||||
|
||||
},
|
||||
),
|
||||
Divider(
|
||||
color: Colors.grey,
|
||||
),
|
||||
// Add Tanks
|
||||
ListTile(
|
||||
title: Row(
|
||||
children: const [
|
||||
Image(image: const AssetImage('images/ic_launcher.png'),height: 25,width: 25,fit: BoxFit.fill),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Text('Add Tankers',style: TextStyle(color:primaryColor)),
|
||||
],
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => AddTankers()),
|
||||
);
|
||||
},
|
||||
),
|
||||
Divider(
|
||||
color: Colors.grey,
|
||||
),
|
||||
// Add Tanks
|
||||
ListTile(
|
||||
title: Row(
|
||||
children: const [
|
||||
Image(image: const AssetImage('images/ic_launcher.png'),height: 25,width: 25,fit: BoxFit.fill),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Text('Add Deliveryboy',style: TextStyle(color:primaryColor)),
|
||||
],
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => Deliverboy()),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
Divider(
|
||||
color: Colors.grey,
|
||||
),
|
||||
// Add Tanks
|
||||
ListTile(
|
||||
title: Row(
|
||||
children: const [
|
||||
Image(image: const AssetImage('images/ic_launcher.png'),height: 25,width: 25,fit: BoxFit.fill),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Text('Get All Tanks',style: TextStyle(color:primaryColor)),
|
||||
],
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => TanksView()),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
Divider(
|
||||
color: Colors.grey,
|
||||
),
|
||||
ListTile(
|
||||
title: Row(
|
||||
children: const [
|
||||
Image(image: const AssetImage('images/ic_launcher.png'),height: 25,width: 25,fit: BoxFit.fill),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Text('Customer Support', style: TextStyle(color:primaryColor)),
|
||||
],
|
||||
),
|
||||
onTap: () {},
|
||||
),
|
||||
Divider(
|
||||
color: Colors.grey,
|
||||
),
|
||||
ListTile(
|
||||
title: Row(
|
||||
children: const [
|
||||
Image(image: const AssetImage('images/ic_launcher.png'),height: 25,width: 25,fit: BoxFit.fill),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Text('Logout', style: TextStyle(color:primaryColor)),
|
||||
],
|
||||
),
|
||||
onTap: () async{
|
||||
|
||||
|
||||
showLogoutAlertDialog(context);
|
||||
|
||||
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
body: _dashBoard(),
|
||||
/*body: IndexedStack(
|
||||
index: _selectedIndex,
|
||||
children: screens,
|
||||
),*/
|
||||
/* bottomNavigationBar: Container(
|
||||
//height: MediaQuery.of(context).size.height,
|
||||
child: BottomNavigationBar(
|
||||
items: const <BottomNavigationBarItem>[
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(
|
||||
Icons.home,
|
||||
),
|
||||
label: 'Home',
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.propane_tank),
|
||||
label: 'Add Tanks',
|
||||
),
|
||||
*//*BottomNavigationBarItem(
|
||||
icon: Icon(Icons.private_connectivity_outlined),
|
||||
label: 'CreateConnections',
|
||||
),*//*
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.list_alt),
|
||||
label: 'Add Tanker',
|
||||
),
|
||||
],
|
||||
currentIndex: _selectedIndex,
|
||||
selectedItemColor: primaryColor,
|
||||
unselectedItemColor: greyColor,
|
||||
showUnselectedLabels: true,
|
||||
onTap: _onItemTapped,
|
||||
),
|
||||
),*/
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
import 'package:geocoding/geocoding.dart';
|
||||
|
||||
class LocationPage extends StatefulWidget {
|
||||
const LocationPage({Key? key}) : super(key: key);
|
||||
@override
|
||||
State<LocationPage> createState() => _LocationPageState();
|
||||
}
|
||||
|
||||
class _LocationPageState extends State<LocationPage> {
|
||||
String? _currentAddress;
|
||||
Position? _currentPosition;
|
||||
|
||||
Future<bool> _handleLocationPermission() async {
|
||||
bool serviceEnabled;
|
||||
LocationPermission permission;
|
||||
|
||||
serviceEnabled = await Geolocator.isLocationServiceEnabled();
|
||||
if (!serviceEnabled) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
|
||||
content: Text(
|
||||
'Location services are disabled. Please enable the services')));
|
||||
return false;
|
||||
}
|
||||
permission = await Geolocator.checkPermission();
|
||||
if (permission == LocationPermission.denied) {
|
||||
permission = await Geolocator.requestPermission();
|
||||
if (permission == LocationPermission.denied) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text('Location permissions are denied')));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (permission == LocationPermission.deniedForever) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
|
||||
content: Text(
|
||||
'Location permissions are permanently denied, we cannot request permissions.')));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Future<void> _getCurrentPosition() async {
|
||||
final hasPermission = await _handleLocationPermission();
|
||||
|
||||
if (!hasPermission) return;
|
||||
await Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.high)
|
||||
.then((Position position) {
|
||||
setState(() => _currentPosition = position);
|
||||
_getAddressFromLatLng(_currentPosition!);
|
||||
}).catchError((e) {
|
||||
debugPrint(e);
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> _getAddressFromLatLng(Position position) async {
|
||||
await placemarkFromCoordinates(
|
||||
_currentPosition!.latitude, _currentPosition!.longitude)
|
||||
.then((List<Placemark> placemarks) {
|
||||
|
||||
Placemark place = placemarks[0];
|
||||
_currentAddress = '${place.street}, ${place.subLocality}, ${place.locality}, ${place.postalCode}, ${place.country}';
|
||||
print(place);
|
||||
|
||||
setState(() {
|
||||
});
|
||||
}).catchError((e) {
|
||||
debugPrint(e);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text("Location Page")),
|
||||
body: SafeArea(
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('LAT: ${_currentPosition?.latitude ?? ""}'),
|
||||
Text('LNG: ${_currentPosition?.longitude ?? ""}'),
|
||||
Text('ADDRESS: ${_currentAddress ?? ""}'),
|
||||
const SizedBox(height:32),
|
||||
ElevatedButton(
|
||||
onPressed: _getCurrentPosition,
|
||||
child: const Text("Get Current Location"),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
library google_maps_place_picker_mb;
|
||||
|
||||
export 'src/models/pick_result.dart';
|
||||
export 'src/components/floating_card.dart';
|
||||
export 'src/components/rounded_frame.dart';
|
||||
export 'src/models/circle_area.dart';
|
||||
export 'src/place_picker.dart';
|
@ -0,0 +1,162 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'package:google_maps_webservice/geocoding.dart';
|
||||
import 'package:google_maps_webservice/places.dart';
|
||||
|
||||
import 'package:http/http.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../src/models/pick_result.dart';
|
||||
import '../src/place_picker.dart';
|
||||
|
||||
class PlaceProvider extends ChangeNotifier {
|
||||
PlaceProvider(
|
||||
String apiKey,
|
||||
String? proxyBaseUrl,
|
||||
Client? httpClient,
|
||||
Map<String, dynamic> apiHeaders,
|
||||
) {
|
||||
places = GoogleMapsPlaces(
|
||||
apiKey: apiKey,
|
||||
baseUrl: proxyBaseUrl,
|
||||
httpClient: httpClient,
|
||||
apiHeaders: apiHeaders as Map<String, String>?,
|
||||
);
|
||||
|
||||
geocoding = GoogleMapsGeocoding(
|
||||
apiKey: apiKey,
|
||||
baseUrl: proxyBaseUrl,
|
||||
httpClient: httpClient,
|
||||
apiHeaders: apiHeaders as Map<String, String>?,
|
||||
);
|
||||
}
|
||||
|
||||
static PlaceProvider of(BuildContext context, {bool listen = true}) =>
|
||||
Provider.of<PlaceProvider>(context, listen: listen);
|
||||
|
||||
late GoogleMapsPlaces places;
|
||||
late GoogleMapsGeocoding geocoding;
|
||||
String? sessionToken;
|
||||
bool isOnUpdateLocationCooldown = false;
|
||||
LocationAccuracy? desiredAccuracy;
|
||||
bool isAutoCompleteSearching = false;
|
||||
|
||||
Future<void> updateCurrentLocation(bool forceAndroidLocationManager) async {
|
||||
bool serviceEnabled;
|
||||
LocationPermission permission;
|
||||
|
||||
// Test if location services are enabled.
|
||||
serviceEnabled = await Geolocator.isLocationServiceEnabled();
|
||||
if (!serviceEnabled) {
|
||||
// Location services are not enabled don't continue
|
||||
// accessing the position and request users of the
|
||||
// App to enable the location services.
|
||||
return Future.error('Location services are disabled.');
|
||||
}
|
||||
|
||||
permission = await Geolocator.checkPermission();
|
||||
if (permission == LocationPermission.denied) {
|
||||
permission = await Geolocator.requestPermission();
|
||||
if (permission == LocationPermission.denied) {
|
||||
// Permissions are denied, next time you could try
|
||||
// requesting permissions again (this is also where
|
||||
// Android's shouldShowRequestPermissionRationale
|
||||
// returned true. According to Android guidelines
|
||||
// your App should show an explanatory UI now.
|
||||
return Future.error('Location permissions are denied');
|
||||
}
|
||||
}
|
||||
|
||||
if (permission == LocationPermission.deniedForever) {
|
||||
// Permissions are denied forever, handle appropriately.
|
||||
return Future.error(
|
||||
'Location permissions are permanently denied, we cannot request permissions.');
|
||||
}
|
||||
|
||||
Position position = await Geolocator.getCurrentPosition(
|
||||
desiredAccuracy: LocationAccuracy.best,
|
||||
);
|
||||
|
||||
currentPosition = position;
|
||||
|
||||
// notifyListeners();
|
||||
}
|
||||
|
||||
Position? _currentPosition;
|
||||
Position? get currentPosition => _currentPosition;
|
||||
set currentPosition(Position? newPosition) {
|
||||
_currentPosition = newPosition;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Timer? _debounceTimer;
|
||||
Timer? get debounceTimer => _debounceTimer;
|
||||
set debounceTimer(Timer? timer) {
|
||||
_debounceTimer = timer;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
CameraPosition? _previousCameraPosition;
|
||||
CameraPosition? get prevCameraPosition => _previousCameraPosition;
|
||||
setPrevCameraPosition(CameraPosition? prePosition) {
|
||||
_previousCameraPosition = prePosition;
|
||||
}
|
||||
|
||||
CameraPosition? _currentCameraPosition;
|
||||
CameraPosition? get cameraPosition => _currentCameraPosition;
|
||||
setCameraPosition(CameraPosition? newPosition) {
|
||||
_currentCameraPosition = newPosition;
|
||||
}
|
||||
|
||||
PickResult? _selectedPlace;
|
||||
PickResult? get selectedPlace => _selectedPlace;
|
||||
set selectedPlace(PickResult? result) {
|
||||
_selectedPlace = result;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
SearchingState _placeSearchingState = SearchingState.Idle;
|
||||
SearchingState get placeSearchingState => _placeSearchingState;
|
||||
set placeSearchingState(SearchingState newState) {
|
||||
_placeSearchingState = newState;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
GoogleMapController? _mapController;
|
||||
GoogleMapController? get mapController => _mapController;
|
||||
set mapController(GoogleMapController? controller) {
|
||||
_mapController = controller;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
PinState _pinState = PinState.Preparing;
|
||||
PinState get pinState => _pinState;
|
||||
set pinState(PinState newState) {
|
||||
_pinState = newState;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
bool _isSeachBarFocused = false;
|
||||
bool get isSearchBarFocused => _isSeachBarFocused;
|
||||
set isSearchBarFocused(bool focused) {
|
||||
_isSeachBarFocused = focused;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
MapType _mapType = MapType.normal;
|
||||
MapType get mapType => _mapType;
|
||||
setMapType(MapType mapType, {bool notify = false}) {
|
||||
_mapType = mapType;
|
||||
if (notify) notifyListeners();
|
||||
}
|
||||
|
||||
switchMapType() {
|
||||
_mapType = MapType.values[(_mapType.index + 1) % MapType.values.length];
|
||||
if (_mapType == MapType.none) _mapType = MapType.normal;
|
||||
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class SearchProvider extends ChangeNotifier {
|
||||
static SearchProvider of(BuildContext context, {bool listen = true}) =>
|
||||
Provider.of<SearchProvider>(context, listen: listen);
|
||||
|
||||
String prevSearchTerm = "";
|
||||
String _searchTerm = "";
|
||||
String get searchTerm => _searchTerm;
|
||||
|
||||
set searchTerm(String newValue) {
|
||||
_searchTerm = newValue;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
@ -0,0 +1,341 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_maps_webservice/places.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:watermanagement/google_maps_place_picker_mb/google_maps_place_picker.dart';
|
||||
import 'package:watermanagement/google_maps_place_picker_mb/providers/place_provider.dart';
|
||||
import 'package:watermanagement/google_maps_place_picker_mb/providers/search_provider.dart';
|
||||
import 'package:watermanagement/google_maps_place_picker_mb/src/components/prediction_tile.dart';
|
||||
import 'package:watermanagement/google_maps_place_picker_mb/src/components/rounded_frame.dart';
|
||||
import 'package:watermanagement/google_maps_place_picker_mb/src/controllers/autocomplete_search_controller.dart';
|
||||
|
||||
class AutoCompleteSearch extends StatefulWidget {
|
||||
const AutoCompleteSearch(
|
||||
{Key? key,
|
||||
required this.sessionToken,
|
||||
required this.onPicked,
|
||||
required this.appBarKey,
|
||||
this.hintText = "Search here",
|
||||
this.searchingText = "Searching...",
|
||||
this.hidden = false,
|
||||
this.height = 40,
|
||||
this.contentPadding = EdgeInsets.zero,
|
||||
this.debounceMilliseconds,
|
||||
this.onSearchFailed,
|
||||
required this.searchBarController,
|
||||
this.autocompleteOffset,
|
||||
this.autocompleteRadius,
|
||||
this.autocompleteLanguage,
|
||||
this.autocompleteComponents,
|
||||
this.autocompleteTypes,
|
||||
this.strictbounds,
|
||||
this.region,
|
||||
this.initialSearchString,
|
||||
this.searchForInitialValue,
|
||||
this.autocompleteOnTrailingWhitespace})
|
||||
: super(key: key);
|
||||
|
||||
final String? sessionToken;
|
||||
final String? hintText;
|
||||
final String? searchingText;
|
||||
final bool hidden;
|
||||
final double height;
|
||||
final EdgeInsetsGeometry contentPadding;
|
||||
final int? debounceMilliseconds;
|
||||
final ValueChanged<Prediction> onPicked;
|
||||
final ValueChanged<String>? onSearchFailed;
|
||||
final SearchBarController searchBarController;
|
||||
final num? autocompleteOffset;
|
||||
final num? autocompleteRadius;
|
||||
final String? autocompleteLanguage;
|
||||
final List<String>? autocompleteTypes;
|
||||
final List<Component>? autocompleteComponents;
|
||||
final bool? strictbounds;
|
||||
final String? region;
|
||||
final GlobalKey appBarKey;
|
||||
final String? initialSearchString;
|
||||
final bool? searchForInitialValue;
|
||||
final bool? autocompleteOnTrailingWhitespace;
|
||||
|
||||
@override
|
||||
AutoCompleteSearchState createState() => AutoCompleteSearchState();
|
||||
}
|
||||
|
||||
class AutoCompleteSearchState extends State<AutoCompleteSearch> {
|
||||
TextEditingController controller = TextEditingController();
|
||||
FocusNode focus = FocusNode();
|
||||
OverlayEntry? overlayEntry;
|
||||
SearchProvider provider = SearchProvider();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
if (widget.initialSearchString != null) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
controller.text = widget.initialSearchString!;
|
||||
if (widget.searchForInitialValue!) {
|
||||
_onSearchInputChange();
|
||||
}
|
||||
});
|
||||
}
|
||||
controller.addListener(_onSearchInputChange);
|
||||
focus.addListener(_onFocusChanged);
|
||||
|
||||
widget.searchBarController.attach(this);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
controller.removeListener(_onSearchInputChange);
|
||||
controller.dispose();
|
||||
|
||||
focus.removeListener(_onFocusChanged);
|
||||
focus.dispose();
|
||||
_clearOverlay();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return !widget.hidden
|
||||
? ChangeNotifierProvider.value(
|
||||
value: provider,
|
||||
child: RoundedFrame(
|
||||
height: widget.height,
|
||||
padding: const EdgeInsets.only(right: 10),
|
||||
color: Theme.of(context).brightness == Brightness.dark
|
||||
? Colors.black54
|
||||
: Colors.white,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
elevation: 4.0,
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
SizedBox(width: 10),
|
||||
Icon(Icons.search),
|
||||
SizedBox(width: 10),
|
||||
Expanded(child: _buildSearchTextField()),
|
||||
_buildTextClearIcon(),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: Container();
|
||||
}
|
||||
|
||||
Widget _buildSearchTextField() {
|
||||
return TextField(
|
||||
controller: controller,
|
||||
focusNode: focus,
|
||||
decoration: InputDecoration(
|
||||
hintText: widget.hintText,
|
||||
border: InputBorder.none,
|
||||
errorBorder: InputBorder.none,
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
disabledBorder: InputBorder.none,
|
||||
focusedErrorBorder: InputBorder.none,
|
||||
isDense: true,
|
||||
contentPadding: widget.contentPadding,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildTextClearIcon() {
|
||||
return Selector<SearchProvider, String>(
|
||||
selector: (_, provider) => provider.searchTerm,
|
||||
builder: (_, data, __) {
|
||||
if (data.length > 0) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: GestureDetector(
|
||||
child: Icon(
|
||||
Icons.clear,
|
||||
color: Theme.of(context).brightness == Brightness.dark
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
),
|
||||
onTap: () {
|
||||
clearText();
|
||||
},
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return SizedBox(width: 10);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
_onSearchInputChange() {
|
||||
if (!mounted) return;
|
||||
this.provider.searchTerm = controller.text;
|
||||
|
||||
PlaceProvider provider = PlaceProvider.of(context, listen: false);
|
||||
|
||||
if (controller.text.isEmpty) {
|
||||
provider.debounceTimer?.cancel();
|
||||
_searchPlace(controller.text);
|
||||
return;
|
||||
}
|
||||
|
||||
if (controller.text.trim() == this.provider.prevSearchTerm.trim()) {
|
||||
provider.debounceTimer?.cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!widget.autocompleteOnTrailingWhitespace! &&
|
||||
controller.text.substring(controller.text.length - 1) == " ") {
|
||||
provider.debounceTimer?.cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
if (provider.debounceTimer?.isActive ?? false) {
|
||||
provider.debounceTimer!.cancel();
|
||||
}
|
||||
|
||||
provider.debounceTimer =
|
||||
Timer(Duration(milliseconds: widget.debounceMilliseconds!), () {
|
||||
_searchPlace(controller.text.trim());
|
||||
});
|
||||
}
|
||||
|
||||
_onFocusChanged() {
|
||||
PlaceProvider provider = PlaceProvider.of(context, listen: false);
|
||||
provider.isSearchBarFocused = focus.hasFocus;
|
||||
provider.debounceTimer?.cancel();
|
||||
provider.placeSearchingState = SearchingState.Idle;
|
||||
}
|
||||
|
||||
_searchPlace(String searchTerm) {
|
||||
this.provider.prevSearchTerm = searchTerm;
|
||||
|
||||
_clearOverlay();
|
||||
|
||||
if (searchTerm.length < 1) return;
|
||||
|
||||
_displayOverlay(_buildSearchingOverlay());
|
||||
|
||||
_performAutoCompleteSearch(searchTerm);
|
||||
}
|
||||
|
||||
_clearOverlay() {
|
||||
if (overlayEntry != null) {
|
||||
overlayEntry!.remove();
|
||||
overlayEntry = null;
|
||||
}
|
||||
}
|
||||
|
||||
_displayOverlay(Widget overlayChild) {
|
||||
_clearOverlay();
|
||||
|
||||
final RenderBox? appBarRenderBox =
|
||||
widget.appBarKey.currentContext!.findRenderObject() as RenderBox?;
|
||||
final translation = appBarRenderBox?.getTransformTo(null).getTranslation();
|
||||
final Offset offset = translation != null
|
||||
? Offset(translation.x, translation.y)
|
||||
: Offset(0.0, 0.0);
|
||||
final screenWidth = MediaQuery.of(context).size.width;
|
||||
|
||||
overlayEntry = OverlayEntry(
|
||||
builder: (context) => Positioned(
|
||||
top: appBarRenderBox!.paintBounds.shift(offset).top +
|
||||
appBarRenderBox.size.height,
|
||||
left: screenWidth * 0.025,
|
||||
right: screenWidth * 0.025,
|
||||
child: Material(
|
||||
elevation: 4.0,
|
||||
child: overlayChild,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Overlay.of(context)!.insert(overlayEntry!);
|
||||
}
|
||||
|
||||
Widget _buildSearchingOverlay() {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 24),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
height: 24,
|
||||
width: 24,
|
||||
child: CircularProgressIndicator(strokeWidth: 3),
|
||||
),
|
||||
SizedBox(width: 24),
|
||||
Expanded(
|
||||
child: Text(
|
||||
widget.searchingText ?? "Searching...",
|
||||
style: TextStyle(fontSize: 16),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildPredictionOverlay(List<Prediction> predictions) {
|
||||
return ListBody(
|
||||
children: predictions
|
||||
.map(
|
||||
(p) => PredictionTile(
|
||||
prediction: p,
|
||||
onTap: (selectedPrediction) {
|
||||
resetSearchBar();
|
||||
widget.onPicked(selectedPrediction);
|
||||
},
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
_performAutoCompleteSearch(String searchTerm) async {
|
||||
PlaceProvider provider = PlaceProvider.of(context, listen: false);
|
||||
|
||||
if (searchTerm.isNotEmpty) {
|
||||
final PlacesAutocompleteResponse response =
|
||||
await provider.places.autocomplete(
|
||||
searchTerm,
|
||||
sessionToken: widget.sessionToken,
|
||||
location: provider.currentPosition == null
|
||||
? null
|
||||
: Location(
|
||||
lat: provider.currentPosition!.latitude,
|
||||
lng: provider.currentPosition!.longitude),
|
||||
offset: widget.autocompleteOffset,
|
||||
radius: widget.autocompleteRadius,
|
||||
language: widget.autocompleteLanguage,
|
||||
types: widget.autocompleteTypes ?? const [],
|
||||
components: widget.autocompleteComponents ?? const [],
|
||||
strictbounds: widget.strictbounds ?? false,
|
||||
region: widget.region,
|
||||
);
|
||||
|
||||
if (response.errorMessage?.isNotEmpty == true ||
|
||||
response.status == "REQUEST_DENIED") {
|
||||
if (widget.onSearchFailed != null) {
|
||||
widget.onSearchFailed!(response.status);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
_displayOverlay(_buildPredictionOverlay(response.predictions));
|
||||
}
|
||||
}
|
||||
|
||||
clearText() {
|
||||
provider.searchTerm = "";
|
||||
controller.clear();
|
||||
}
|
||||
|
||||
resetSearchBar() {
|
||||
clearText();
|
||||
focus.unfocus();
|
||||
}
|
||||
|
||||
clearOverlay() {
|
||||
_clearOverlay();
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AnimatedPin extends StatefulWidget {
|
||||
AnimatedPin({
|
||||
Key? key,
|
||||
this.child,
|
||||
});
|
||||
|
||||
final Widget? child;
|
||||
|
||||
@override
|
||||
_AnimatedPinState createState() => _AnimatedPinState();
|
||||
}
|
||||
|
||||
class _AnimatedPinState extends State<AnimatedPin>
|
||||
with TickerProviderStateMixin {
|
||||
late AnimationController _controller;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_controller = AnimationController(
|
||||
duration: const Duration(seconds: 1),
|
||||
vsync: this,
|
||||
)..repeat();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return JumpingContainer(controller: _controller, child: widget.child);
|
||||
}
|
||||
}
|
||||
|
||||
class JumpingContainer extends AnimatedWidget {
|
||||
const JumpingContainer({
|
||||
Key? key,
|
||||
required AnimationController controller,
|
||||
this.child,
|
||||
}) : super(key: key, listenable: controller);
|
||||
|
||||
final Widget? child;
|
||||
|
||||
Animation<double> get _progress => listenable as Animation<double>;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Transform.translate(
|
||||
offset: Offset(0, -10 + _progress.value * 10),
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:watermanagement/google_maps_place_picker_mb/src/components/rounded_frame.dart';
|
||||
|
||||
class FloatingCard extends StatelessWidget {
|
||||
const FloatingCard({
|
||||
Key? key,
|
||||
this.topPosition,
|
||||
this.leftPosition,
|
||||
this.rightPosition,
|
||||
this.bottomPosition,
|
||||
this.width,
|
||||
this.height,
|
||||
this.borderRadius = BorderRadius.zero,
|
||||
this.elevation = 0.0,
|
||||
this.color,
|
||||
this.child,
|
||||
}) : super(key: key);
|
||||
|
||||
final double? topPosition;
|
||||
final double? leftPosition;
|
||||
final double? bottomPosition;
|
||||
final double? rightPosition;
|
||||
final double? width;
|
||||
final double? height;
|
||||
final BorderRadius borderRadius;
|
||||
final double elevation;
|
||||
final Color? color;
|
||||
final Widget? child;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Positioned(
|
||||
top: topPosition,
|
||||
left: leftPosition,
|
||||
right: rightPosition,
|
||||
bottom: bottomPosition,
|
||||
child: RoundedFrame(
|
||||
width: width,
|
||||
height: height,
|
||||
borderRadius: borderRadius,
|
||||
elevation: elevation,
|
||||
color: color,
|
||||
child: child,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_maps_webservice/places.dart';
|
||||
|
||||
class PredictionTile extends StatelessWidget {
|
||||
final Prediction prediction;
|
||||
final ValueChanged<Prediction>? onTap;
|
||||
|
||||
PredictionTile({required this.prediction, this.onTap});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListTile(
|
||||
leading: Icon(Icons.location_on),
|
||||
title: RichText(
|
||||
text: TextSpan(
|
||||
children: _buildPredictionText(context),
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
if (onTap != null) {
|
||||
onTap!(prediction);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
List<TextSpan> _buildPredictionText(BuildContext context) {
|
||||
final List<TextSpan> result = <TextSpan>[];
|
||||
final textColor = Theme.of(context).textTheme.bodyText2!.color;
|
||||
|
||||
if (prediction.matchedSubstrings.length > 0) {
|
||||
MatchedSubstring matchedSubString = prediction.matchedSubstrings[0];
|
||||
// There is no matched string at the beginning.
|
||||
if (matchedSubString.offset > 0) {
|
||||
result.add(
|
||||
TextSpan(
|
||||
text: prediction.description
|
||||
?.substring(0, matchedSubString.offset as int?),
|
||||
style: TextStyle(
|
||||
color: textColor, fontSize: 16, fontWeight: FontWeight.w300),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// Matched strings.
|
||||
result.add(
|
||||
TextSpan(
|
||||
text: prediction.description?.substring(
|
||||
matchedSubString.offset as int,
|
||||
matchedSubString.offset + matchedSubString.length as int?),
|
||||
style: TextStyle(
|
||||
color: textColor, fontSize: 16, fontWeight: FontWeight.w500),
|
||||
),
|
||||
);
|
||||
|
||||
// Other strings.
|
||||
if (matchedSubString.offset + matchedSubString.length <
|
||||
(prediction.description?.length ?? 0)) {
|
||||
result.add(
|
||||
TextSpan(
|
||||
text: prediction.description?.substring(
|
||||
matchedSubString.offset + matchedSubString.length as int),
|
||||
style: TextStyle(
|
||||
color: textColor, fontSize: 16, fontWeight: FontWeight.w300),
|
||||
),
|
||||
);
|
||||
}
|
||||
// If there is no matched strings, but there are predicts. (Not sure if this happens though)
|
||||
} else {
|
||||
result.add(
|
||||
TextSpan(
|
||||
text: prediction.description,
|
||||
style: TextStyle(
|
||||
color: textColor, fontSize: 16, fontWeight: FontWeight.w300),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|