Big update, everything should be working perfectly smooth

This commit is contained in:
Supan Adit Pratama 2020-07-08 20:13:24 +07:00
parent d641ffe8c1
commit a588d77452
50 changed files with 330 additions and 723 deletions

45
.gitignore vendored
View File

@ -18,56 +18,21 @@
# 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/
.vscode/
# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java
# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*
# Web related
lib/generated_plugin_registrant.dart
# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
.gradle

View File

@ -1,10 +0,0 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: 68587a0916366e9512a78df22c44163d041dd5f3
channel: stable
project_type: app

View File

@ -1,8 +1,15 @@
# GEO Smart App
![Show Case](https://i.ibb.co/4ZBZCFj/Whats-App-Image-2020-07-08-at-8-08-55-PM.jpg)
This is the Mobile Application for [Geo Smart System](https://github.com/supanadit/geosmartsystem) and [Geo Smart Map](https://github.com/supanadit/geosmartmap)
## Requirements
- Flutter
- Android 6.0.1+
## Quick Start
- Clone this repository
- `flutter pub get`
- `flutter run`
## Todo
- Integration With Geo Smart System ( OK )

View File

@ -23,7 +23,6 @@ if (flutterVersionName == null) {
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
@ -39,12 +38,11 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.supanadit.geo_app"
applicationId "com.example.geosmart"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
@ -62,10 +60,4 @@ flutter {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.firebase:firebase-analytics:17.2.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
}
apply plugin: 'com.google.gms.google-services'

View File

@ -1,40 +0,0 @@
{
"project_info": {
"project_number": "908118791305",
"firebase_url": "https://geo-app-supanadit.firebaseio.com",
"project_id": "geo-app-supanadit",
"storage_bucket": "geo-app-supanadit.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:908118791305:android:d230276ba7f053e3e9e258",
"android_client_info": {
"package_name": "com.supanadit.geo_app"
}
},
"oauth_client": [
{
"client_id": "908118791305-pif2888l3d7qs7hjqs4pkcbcc74ga10h.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDqOWFq6PaPeSIn14jcXSaTovDYU9S1tYU"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "908118791305-pif2888l3d7qs7hjqs4pkcbcc74ga10h.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

View File

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.supanadit.geo_app">
package="com.example.geosmart">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->

View File

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.supanadit.geo_app">
package="com.example.geosmart">
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
@ -12,29 +12,42 @@
<application
android:name="io.flutter.app.FlutterApplication"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:label="Geo Smart"
android:usesCleartextTraffic="true">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/api_key" />
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<!-- 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.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

View File

@ -1,13 +0,0 @@
package com.supanadit.geo_app
import android.os.Bundle
import io.flutter.app.FlutterActivity
import io.flutter.plugins.GeneratedPluginRegistrant
class MainActivity: FlutterActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
GeneratedPluginRegistrant.registerWith(this)
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,8 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter 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:color/white</item>
</style>
</resources>

View File

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.supanadit.geo_app">
package="com.example.geosmart">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->

View File

@ -1,14 +1,13 @@
buildscript {
ext.kotlin_version = '1.2.71'
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.2'
}
}
@ -26,16 +25,6 @@ subprojects {
subprojects {
project.evaluationDependsOn(':app')
}
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'androidx.core' &&
!details.requested.name.contains('androidx')) {
details.useVersion "1.0.1"
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir

View File

@ -1,5 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true

View File

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip

View File

@ -1,15 +1,15 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
include ':app'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}
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"

View File

@ -9,12 +9,7 @@
/* 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 */; };
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
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 */; };
@ -27,8 +22,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@ -39,13 +32,11 @@
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>"; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; 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>"; };
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; 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>"; };
@ -58,8 +49,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -69,9 +58,7 @@
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
3B80C3931E831B6300D905FE /* App.framework */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEBA1CF902C7004384FC /* Flutter.framework */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
@ -149,16 +136,16 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "The Chromium Authors";
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 0910;
LastSwiftMigration = 1100;
};
};
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 3.2";
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
@ -182,7 +169,6 @@
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
@ -203,7 +189,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
@ -298,6 +284,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
@ -321,10 +308,10 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.supanadit.geoApp;
PRODUCT_BUNDLE_IDENTIFIER = com.example.geosmart;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
@ -430,6 +417,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
@ -454,11 +442,11 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.supanadit.geoApp;
PRODUCT_BUNDLE_IDENTIFIER = com.example.geosmart;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
@ -481,10 +469,10 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.supanadit.geoApp;
PRODUCT_BUNDLE_IDENTIFIER = com.example.geosmart;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
@ -513,7 +501,6 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}

View File

@ -7,6 +7,7 @@ import Flutter
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GMSServices.provideAPIKey("AIzaSyCjhBV5aq1gsTCYsr6QCCxYusFlBa3DEMs")
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

View File

@ -11,7 +11,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>geo_app</string>
<string>geosmart</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>

View File

@ -1 +1 @@
#import "GeneratedPluginRegistrant.h"
#import "GeneratedPluginRegistrant.h"

View File

@ -1,32 +0,0 @@
import 'package:geo_app/model/response.dart';
import 'package:geo_app/model/setting.dart';
import 'package:geo_app/repository/position_repository.dart';
import 'package:rxdart/rxdart.dart';
class PositionBloc {
PositionRepository _repository;
final PublishSubject<ResponseModel> _subject =
PublishSubject<ResponseModel>();
SettingModel _settingModel;
PositionBloc(this._settingModel) {
this._repository = PositionRepository(this._settingModel);
}
dispose() {
_subject.close();
}
sendPosition(String lat, String lng) async {
ResponseModel response = await _repository.sendPosition(lat, lng);
_subject.sink.add(response);
}
stopTracking() async {
ResponseModel response = await _repository.stopTracking();
_subject.sink.add(response);
}
PublishSubject<ResponseModel> get subject => _subject;
}

View File

@ -1,27 +0,0 @@
import 'package:geo_app/model/setting.dart';
import 'package:geo_app/model/unique_id_model.dart';
import 'package:geo_app/repository/unique_id_repository.dart';
import 'package:rxdart/rxdart.dart';
class UniqueIDBloc {
UniqueIDRepository _repository;
final PublishSubject<UniqueIDModel> _subject =
PublishSubject<UniqueIDModel>();
SettingModel _settingModel;
UniqueIDBloc(this._settingModel) {
this._repository = UniqueIDRepository(this._settingModel);
}
dispose() {
_subject.close();
}
getUniqueID() async {
UniqueIDModel response = await _repository.getUniqueID();
_subject.sink.add(response);
}
PublishSubject<UniqueIDModel> get subject => _subject;
}

View File

@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:geo_app/page/startup.dart';
import 'package:geosmart/page/startup.dart';
void main() => runApp(MyApp());

View File

@ -1,8 +1,8 @@
import 'dart:convert';
import 'package:geo_app/config.dart';
import 'package:geo_app/model/response.dart';
import 'package:geo_app/model/unique_id_model.dart';
import 'package:geosmart/config.dart';
import 'package:geosmart/model/response.dart';
import 'package:geosmart/model/unique_id_model.dart';
import 'package:http/http.dart' as http;
import 'package:shared_preferences/shared_preferences.dart';

View File

@ -1,19 +1,14 @@
import 'dart:async';
import 'dart:io';
import 'package:background_location/background_location.dart';
import 'package:device_info/device_info.dart';
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:geo_app/bloc/position_bloc.dart';
import 'package:geo_app/bloc/setting.dart';
import 'package:geo_app/model/position.dart';
import 'package:geo_app/page/setting.dart';
import 'package:geolocator/geolocator.dart' as geo;
import 'package:geosmart/model/position.dart';
import 'package:geosmart/model/setting.dart';
import 'package:geosmart/page/setting.dart';
import 'package:geosmart/service/position_service.dart';
import 'package:geosmart/service/setting_service.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:flutter_background_geolocation/flutter_background_geolocation.dart'
as bg;
import 'package:permission_handler/permission_handler.dart';
import 'package:rxdart/rxdart.dart';
class Map extends StatefulWidget {
Map({Key key, this.title}) : super(key: key);
@ -32,172 +27,74 @@ class _MapState extends State<Map> {
double accuracy = 0.0;
double bearing = 0.0;
double speed = 0.0;
Position _position;
PositionBloc _positionBloc;
SettingBloc _settingBloc;
PublishSubject<bool> _checkDevice;
PositionService _positionService;
SettingService _settingService;
bool isChecking = true;
Position _position;
String id;
String host;
bool isGranted = false;
bool isTracking = false;
int androidSDKVersion = 0;
_MapState() {
_checkDevice = PublishSubject<bool>();
}
getPermission() {
BackgroundLocation.getPermissions(
onDenied: () {
isGranted = false;
print("Denied");
},
onGranted: () {
isGranted = true;
print("Granted");
},
);
}
@override
void initState() {
super.initState();
PermissionHandler()
.requestPermissions([PermissionGroup.location]).then((permissions) {
permissions.forEach((group, status) {
print("$group With Status $status");
});
setState(() {
isChecking = true;
});
if (Platform.isAndroid) {
PermissionHandler()
.shouldShowRequestPermissionRationale(PermissionGroup.location)
.then((isShow) {
print("Is Show $isShow");
});
DeviceInfoPlugin().androidInfo.then((androidInfo) {
var release = androidInfo.version.release;
var sdkInt = androidInfo.version.sdkInt;
var manufacturer = androidInfo.manufacturer;
var model = androidInfo.model;
print('Android $release (SDK $sdkInt), $manufacturer $model');
androidSDKVersion = sdkInt;
if (sdkInt > 21) {
getPermission();
BackgroundLocation.getLocationUpdates((location) async {
print("Location Updated");
if (!isTracking) {
this.isTracking = true;
}
if (!isGranted) {
this.isGranted = true;
}
this.latitude = location.latitude;
this.longitude = location.longitude;
this.accuracy = location.accuracy;
this.altitude = location.altitude;
this.bearing = location.bearing;
this.speed = location.speed;
_settingService = new SettingService();
_positionService = new PositionService();
// geo.Geolocator()..forceAndroidLocationManager = true;
geo.Geolocator().checkGeolocationPermissionStatus().then(
(v) {
setState(() {
isGranted = true;
});
var geolocator = geo.Geolocator();
var locationOptions = geo.LocationOptions(
accuracy: geo.LocationAccuracy.high,
);
if (this.id != null) {
geolocator
.getPositionStream(locationOptions)
.listen((geo.Position position) {
if (this.id != null) {
setState(() {
this._position = Position(
id: this.id,
lat: this.latitude.toString(),
lng: this.longitude.toString(),
lat: position.latitude.toString(),
lng: position.longitude.toString(),
type: "user",
);
} else {
stopLocationService();
settingPage();
}
});
} else {
stopLocationService();
settingPage();
}
print(
"New position detected with lat ${position.latitude} and lng ${position.longitude}");
sendLastPosition();
});
if (this._position != null) {
if (this._position.isValid()) {
if (_positionBloc != null) {
_positionBloc.sendPosition(
this._position.lat.toString(),
this._position.lng.toString(),
);
} else {
Fluttertoast.showToast(
msg: "Failed to start position service",
);
settingPage();
}
} else {
print("Invalid Position");
}
}
});
setState(() {
isChecking = false;
});
}
if (sdkInt <= 21) {
bg.BackgroundGeolocation.onLocation((bg.Location location) {
print('[location] - $location');
});
_settingService.getSetting().then((v) {
this.id = v.id;
this.host = v.host;
bg.BackgroundGeolocation.onMotionChange((bg.Location location) {
print('[motionchange] - $location');
});
bg.BackgroundGeolocation.onProviderChange(
(bg.ProviderChangeEvent event) {
print('[providerchange] - $event');
});
bg.BackgroundGeolocation.ready(
bg.Config(
desiredAccuracy: bg.Config.DESIRED_ACCURACY_HIGH,
distanceFilter: 10.0,
stopOnTerminate: false,
startOnBoot: true,
debug: true,
logLevel: bg.Config.LOG_LEVEL_VERBOSE,
),
).then(
(bg.State state) {
if (!state.enabled) {
isGranted = true;
isChecking = false;
}
},
);
}
if (v.isNullId()) {
settingPage();
}
});
},
).catchError((e) {
setState(() {
isGranted = false;
});
} else {
getPermission();
}).whenComplete(() {
setState(() {
isChecking = false;
});
}
_settingBloc = new SettingBloc();
_settingBloc.getSetting();
_settingBloc.subject.listen((settingModel) {
this.id = settingModel.id;
this.host = settingModel.host;
if (settingModel.isNullId()) {
settingPage();
}
if (this.host != null && this.host != "") {
setState(() {
_positionBloc = new PositionBloc(settingModel);
_positionBloc.subject.listen((position) {
if (position.isError()) {
stopLocationService();
settingPage();
}
});
});
}
});
}
@ -233,7 +130,7 @@ class _MapState extends State<Map> {
onPressed: toggleTracking,
child: Text(
(isChecking)
? "Pleasewait"
? "Please wait"
: ((isTracking) ? "Stop Tracking" : "Start Tracking"),
style: TextStyle(color: Colors.white),
),
@ -246,55 +143,65 @@ class _MapState extends State<Map> {
);
}
stopLocationService() {
if (androidSDKVersion > 21 || !Platform.isAndroid) {
BackgroundLocation.stopLocationService();
}
if (androidSDKVersion <= 21) {
bg.BackgroundGeolocation.stop();
}
if (_positionBloc != null) {
_positionBloc.stopTracking();
}
}
startLocationService() {
if (androidSDKVersion > 21 || !Platform.isAndroid) {
BackgroundLocation.startLocationService();
}
if (androidSDKVersion <= 21) {
bg.BackgroundGeolocation.start();
}
}
toggleTracking() {
if (!isChecking) {
if (isGranted) {
if (isTracking) {
stopLocationService();
} else {
startLocationService();
sendLastPosition();
}
setState(() {
isTracking = !isTracking;
});
} else {
Fluttertoast.showToast(
FlutterToast.showToast(
msg: "Make sure you have turn on location services",
);
}
}
}
stopLocationService() {
if (_positionService != null) {
_positionService.stopTracking();
}
}
settingPage() {
Navigator.of(context).pushReplacement(new MaterialPageRoute(
builder: (BuildContext context) => Setting(),
));
}
sendLastPosition() async {
SettingModel m = await _settingService.getSetting();
print("Prepare to Send last location with ID : ${m.id} to ${m.host}");
if (this._position != null) {
if (this._position.isValid()) {
if (_positionService != null) {
print("Lat ${_position.lat}, Lng ${_position.lng}");
if (isTracking) {
print("Send tracking location");
_positionService.sendPosition(
this._position.lat.toString(),
this._position.lng.toString(),
);
}
} else {
FlutterToast.showToast(
msg: "Failed to start position service",
);
settingPage();
}
} else {
print("Invalid Position");
}
}
}
@override
void dispose() {
print("Disposed");
super.dispose();
stopLocationService();
}

View File

@ -1,11 +1,11 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:geo_app/bloc/setting.dart';
import 'package:geo_app/bloc/unique_id_bloc.dart';
import 'package:geo_app/config.dart';
import 'package:geo_app/model/setting.dart';
import 'package:geo_app/page/map.dart';
import 'package:geosmart/config.dart';
import 'package:geosmart/model/setting.dart';
import 'package:geosmart/page/map.dart';
import 'package:geosmart/service/setting_service.dart';
import 'package:geosmart/service/unique_id_service.dart';
class Setting extends StatefulWidget {
@override
@ -16,22 +16,20 @@ class Setting extends StatefulWidget {
class _SettingState extends State<Setting> {
final _hostController = TextEditingController();
SettingBloc _settingBloc;
UniqueIDBloc _uniqueIDBloc;
SettingService _settingBloc;
UniqueIDService _uniqueIDBloc;
String id;
String host;
@override
void initState() {
_settingBloc = new SettingBloc();
_settingBloc.getSetting();
_settingBloc = new SettingService();
if (!Config.dynamicHostSetting) {
_settingBloc.setSetting(new SettingModel(Config.api, null));
}
_settingBloc.subject.listen((settingModel) {
_settingBloc.getSetting().then((settingModel) {
if (!settingModel.isNullId()) {
this.id = settingModel.id;
}
@ -42,11 +40,10 @@ class _SettingState extends State<Setting> {
_hostController.text = this.host;
if (!settingModel.isNullHost()) {
_uniqueIDBloc = new UniqueIDBloc(settingModel);
_uniqueIDBloc.getUniqueID();
_uniqueIDBloc = new UniqueIDService(settingModel);
if (_uniqueIDBloc != null) {
this._uniqueIDBloc.subject.listen((uniqueId) {
this._uniqueIDBloc.getUniqueID().then((uniqueId) {
print("Your Unique ID " + uniqueId.id.toString());
if (uniqueId.id != null && uniqueId.id != "") {
if (!settingModel.isNullId()) {
@ -58,7 +55,7 @@ class _SettingState extends State<Setting> {
mapPage();
}
} else {
Fluttertoast.showToast(msg: "Invalid host address");
FlutterToast.showToast(msg: "Invalid host address");
}
});
}
@ -107,9 +104,48 @@ class _SettingState extends State<Setting> {
child: FlatButton(
color: Colors.blueAccent,
onPressed: () {
this._settingBloc.setSetting(
this
._settingBloc
.setSetting(
new SettingModel(this._hostController.text, null),
);
)
.then((settingModel) {
if (!settingModel.isNullId()) {
this.id = settingModel.id;
}
if (!settingModel.isNullHost()) {
this.host = settingModel.host;
}
_hostController.text = this.host;
if (!settingModel.isNullHost()) {
_uniqueIDBloc = new UniqueIDService(settingModel);
if (_uniqueIDBloc != null) {
this._uniqueIDBloc.getUniqueID().then((uniqueId) {
print("Your Unique ID " + uniqueId.id.toString());
if (uniqueId.id != null && uniqueId.id != "") {
if (!settingModel.isNullId()) {
mapPage();
} else {
this._settingBloc.setSetting(
new SettingModel(
this._hostController.text,
uniqueId.id,
),
);
mapPage();
}
} else {
FlutterToast.showToast(
msg: "Invalid host address",
);
}
});
}
}
});
},
child: Text(
"Save",

View File

@ -1,9 +1,9 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:geo_app/bloc/setting.dart';
import 'package:geo_app/component/loader.dart';
import 'package:geo_app/page/map.dart';
import 'package:geo_app/page/setting.dart';
import 'package:geosmart/component/loader.dart';
import 'package:geosmart/page/map.dart';
import 'package:geosmart/page/setting.dart';
import 'package:geosmart/service/setting_service.dart';
class Startup extends StatefulWidget {
@override
@ -13,15 +13,13 @@ class Startup extends StatefulWidget {
}
class _StartupState extends State<Startup> {
SettingBloc _settingBloc;
SettingService _settingService;
@override
void initState() {
_settingBloc = new SettingBloc();
_settingService = new SettingService();
_settingBloc.getSetting();
_settingBloc.subject.listen((settingModel) {
_settingService.getSetting().then((settingModel) {
if (settingModel.isNullHost() && settingModel.isNullId()) {
Navigator.of(context).pushReplacement(new MaterialPageRoute(
builder: (BuildContext context) => Setting(),
@ -32,7 +30,6 @@ class _StartupState extends State<Startup> {
));
}
});
super.initState();
}
@ -58,7 +55,6 @@ class _StartupState extends State<Startup> {
@override
void dispose() {
_settingBloc.dispose();
super.dispose();
}
}

View File

@ -1,20 +0,0 @@
import 'package:geo_app/model/response.dart';
import 'package:geo_app/model/setting.dart';
import 'package:geo_app/provider/position_provider.dart';
class PositionRepository {
PositionProvider _provider;
SettingModel _settingModel;
PositionRepository(this._settingModel) {
this._provider = PositionProvider(this._settingModel);
}
Future<ResponseModel> sendPosition(String lat, String lng) {
return this._provider.sendPosition(lat, lng);
}
Future<ResponseModel> stopTracking() {
return this._provider.stopTracking();
}
}

View File

@ -1,16 +0,0 @@
import 'package:geo_app/model/setting.dart';
import 'package:geo_app/provider/unique_id_provider.dart';
import 'package:geo_app/model/unique_id_model.dart';
class UniqueIDRepository {
UniqueIDProvider _uniqueIDProvider;
SettingModel _settingModel;
UniqueIDRepository(this._settingModel) {
this._uniqueIDProvider = UniqueIDProvider(this._settingModel);
}
Future<UniqueIDModel> getUniqueID() {
return this._uniqueIDProvider.getUniqueID();
}
}

View File

@ -1,24 +1,25 @@
import 'package:dio/dio.dart';
import 'package:geo_app/model/position.dart';
import 'package:geo_app/model/response.dart';
import 'package:geo_app/model/setting.dart';
import 'package:geosmart/model/position.dart';
import 'package:geosmart/model/response.dart';
import 'package:geosmart/service/setting_service.dart';
class PositionProvider {
class PositionService {
final Dio _dio = Dio();
SettingModel _settingModel;
final SettingService _settingBloc = SettingService();
PositionProvider(this._settingModel);
PositionService();
Future<ResponseModel> sendPosition(String lat, String lng) async {
var m = await _settingBloc.getSetting();
Position position = new Position(
id: this._settingModel.id,
id: m.id,
type: "user",
lat: lat,
lng: lng,
);
try {
Response response = await _dio.post(
this._settingModel.host + "/point/set",
m.host + "/point/set",
data: position.toJson(),
);
return ResponseModel.fromJson(response.data);
@ -33,11 +34,12 @@ class PositionProvider {
}
Future<ResponseModel> stopTracking() async {
var m = await _settingBloc.getSetting();
try {
Response response = await _dio.post(
this._settingModel.host + "/point/unset",
m.host + "/point/unset",
data: {
"id": this._settingModel.id,
"id": m.id,
"type": "user",
},
);

View File

@ -1,39 +1,26 @@
import 'package:rxdart/rxdart.dart';
import 'package:geosmart/model/setting.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:geo_app/model/setting.dart';
class SettingBloc {
PublishSubject<SettingModel> _subject;
class SettingService {
final String _host = "host";
final String _id = "id";
SettingBloc() {
this._subject = PublishSubject<SettingModel>();
}
Future<SharedPreferences> getSharedPreferences() async {
return await SharedPreferences.getInstance();
}
setSetting(SettingModel setting) async {
Future<SettingModel> setSetting(SettingModel setting) async {
SharedPreferences sharedPreferences = await this.getSharedPreferences();
sharedPreferences.setString(_host, setting.host);
sharedPreferences.setString(_id, setting.id);
this.getSetting();
return await getSetting();
}
getSetting() async {
Future<SettingModel> getSetting() async {
SharedPreferences sharedPreferences = await this.getSharedPreferences();
_subject.sink.add(new SettingModel(
return new SettingModel(
sharedPreferences.getString(_host),
sharedPreferences.getString(_id),
));
);
}
dispose() {
_subject.close();
}
PublishSubject<SettingModel> get subject => _subject;
}

View File

@ -1,13 +1,13 @@
import 'package:dio/dio.dart';
import 'package:geo_app/model/setting.dart';
import 'package:geo_app/model/unique_id_model.dart';
import 'package:geosmart/model/setting.dart';
import 'package:geosmart/model/unique_id_model.dart';
class UniqueIDProvider {
class UniqueIDService {
final String _endpoint = "/id/get/unique";
final Dio _dio = Dio();
SettingModel _settingModel;
UniqueIDProvider(this._settingModel);
UniqueIDService(this._settingModel);
Future<UniqueIDModel> getUniqueID() async {
try {

View File

@ -1,97 +1,48 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
_fe_analyzer_shared:
dependency: transitive
description:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
analyzer:
dependency: transitive
description:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "0.39.2+1"
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.11"
version: "2.0.13"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.2"
version: "1.6.0"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
background_fetch:
dependency: transitive
description:
name: background_fetch
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.0"
background_location:
dependency: "direct main"
description:
name: background_location
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.9+1"
version: "2.4.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
build:
dependency: transitive
description:
name: build
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.2"
build_config:
dependency: transitive
description:
name: build_config
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.1+1"
version: "2.0.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
checked_yaml:
dependency: transitive
description:
name: checked_yaml
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
version: "1.1.3"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
version: "1.14.12"
convert:
dependency: transitive
description:
@ -105,14 +56,7 @@ packages:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
csslib:
dependency: transitive
description:
name: csslib
url: "https://pub.dartlang.org"
source: hosted
version: "0.16.1"
version: "2.1.4"
cupertino_icons:
dependency: "direct main"
description:
@ -120,39 +64,32 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
dart_style:
dependency: transitive
description:
name: dart_style
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.3"
device_info:
dependency: "direct main"
description:
name: device_info
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.1+4"
dio:
dependency: "direct main"
description:
name: dio
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.8"
version: "3.0.9"
equatable:
dependency: transitive
description:
name: equatable
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_background_geolocation:
dependency: "direct main"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_background_geolocation
name: flutter_plugin_android_lifecycle
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.0"
version: "1.0.8"
flutter_test:
dependency: "direct dev"
description: flutter
@ -169,77 +106,63 @@ packages:
name: fluttertoast
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.3"
glob:
dependency: transitive
version: "5.0.1"
geolocator:
dependency: "direct main"
description:
name: glob
name: geolocator
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "5.3.2+2"
google_api_availability:
dependency: transitive
description:
name: google_api_availability
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
google_maps_flutter:
dependency: "direct main"
description:
name: google_maps_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.21+15"
html:
version: "0.5.28+1"
google_maps_flutter_platform_interface:
dependency: transitive
description:
name: html
name: google_maps_flutter_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "0.14.0+3"
version: "1.0.2"
http:
dependency: "direct main"
description:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.0+3"
version: "0.12.1"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.3"
version: "3.1.4"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
js:
version: "2.1.12"
location_permissions:
dependency: transitive
description:
name: js
name: location_permissions
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.1+1"
json_annotation:
dependency: transitive
description:
name: json_annotation
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
json_serializable:
dependency: "direct main"
description:
name: json_serializable
url: "https://pub.dartlang.org"
source: hosted
version: "3.2.5"
logging:
dependency: transitive
description:
name: logging
url: "https://pub.dartlang.org"
source: hosted
version: "0.11.3+2"
version: "3.0.0+1"
matcher:
dependency: transitive
description:
@ -254,27 +177,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.8"
node_interop:
dependency: transitive
description:
name: node_interop
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
node_io:
dependency: transitive
description:
name: node_io
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1+2"
package_config:
dependency: transitive
description:
name: package_config
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
path:
dependency: transitive
description:
@ -288,14 +190,7 @@ packages:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0+1"
permission_handler:
dependency: "direct main"
description:
name: permission_handler
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
version: "1.9.0"
petitparser:
dependency: transitive
description:
@ -303,81 +198,67 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
pub_semver:
plugin_platform_interface:
dependency: transitive
description:
name: pub_semver
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.2"
pubspec_parse:
dependency: transitive
description:
name: pubspec_parse
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.5"
version: "1.0.2"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
version: "2.1.3"
rxdart:
dependency: "direct main"
description:
name: rxdart
url: "https://pub.dartlang.org"
source: hosted
version: "0.23.1"
version: "0.24.1"
shared_preferences:
dependency: "direct main"
description:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.6"
version: "0.5.7+3"
shared_preferences_macos:
dependency: transitive
description:
name: shared_preferences_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+3"
version: "0.0.1+10"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "1.0.4"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.2+2"
version: "0.1.2+7"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_gen:
dependency: transitive
description:
name: source_gen
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.4+7"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.5"
version: "1.7.0"
stack_trace:
dependency: transitive
description:
@ -392,6 +273,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
stream_transform:
dependency: transitive
description:
name: stream_transform
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
string_scanner:
dependency: transitive
description:
@ -412,7 +300,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.11"
version: "0.2.15"
typed_data:
dependency: transitive
description:
@ -427,27 +315,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
watcher:
dependency: transitive
description:
name: watcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.7+13"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
yaml:
dependency: transitive
description:
name: yaml
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.0"
version: "3.6.1"
sdks:
dart: ">=2.6.0 <3.0.0"
flutter: ">=1.12.13+hotfix.4 <2.0.0"
dart: ">=2.7.0 <3.0.0"
flutter: ">=1.16.3 <2.0.0"

View File

@ -1,5 +1,9 @@
name: geo_app
description: GEO Smart App
name: geosmart
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
@ -14,32 +18,28 @@ description: GEO Smart App
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
google_maps_flutter: ^0.5.21+15
background_location: ^0.0.9
http: ^0.12.0+2
json_serializable: ^3.2.3
shared_preferences: ^0.5.6
rxdart: ^0.23.1
dio: ^3.0.7
fluttertoast: ^3.1.3
device_info: ^0.4.1+4
flutter_background_geolocation: ^1.5.0
permission_handler: ^4.0.0
cupertino_icons: ^0.1.3
geolocator: ^5.3.2+2
http: ^0.12.1
google_maps_flutter: ^0.5.28+1
shared_preferences: ^0.5.7+3
rxdart: ^0.24.1
dio: ^3.0.9
fluttertoast: ^5.0.1
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

View File

@ -8,7 +8,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:geo_app/main.dart';
import 'package:geosmart/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {