完成依赖迁移到空安全

master
laiiihz 4 years ago
parent 9b3df0ec31
commit af169ff22b

@ -52,7 +52,7 @@ MobSDK {
android {
compileSdkVersion 28
compileSdkVersion 29
lintOptions {
disable 'InvalidPackage'
@ -61,7 +61,7 @@ android {
defaultConfig {
applicationId "com.akuhome.recook"
minSdkVersion 22
targetSdkVersion 28
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@ -134,5 +134,6 @@ dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'com.amap.api:location:latest.integration'
}

@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.3.10'
ext.kotlin_version = '1.3.72'
ext.flutterFFmpegPackage = 'min-lts'
repositories {
google()
@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:4.0.1'
// MobSDK
classpath "com.mob.sdk:MobSDK:2018.0319.1724"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

@ -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-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

@ -1,7 +1,6 @@
import 'dart:convert';
import 'dart:io';
import 'package:amap_location_fluttify/amap_location_fluttify.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
@ -44,8 +43,9 @@ void main() async {
WidgetsFlutterBinding.ensureInitialized();
cameras = await availableCameras();
//TODO ios settings
//AMap
AmapLocation.instance.init(iosKey: 'e8a8057cfedcdcadcf4e8f2c7f8de982');
// AmapLocation.instance.init(iosKey: 'e8a8057cfedcdcadcf4e8f2c7f8de982');
//im
TencentImPlugin.init(appid: '1400435566');

@ -10,7 +10,8 @@ import 'dart:async';
import 'dart:collection';
import 'dart:convert';
import 'dart:io';
import 'package:amap_location_fluttify/amap_location_fluttify.dart';
import 'package:amap_flutter_location/amap_flutter_location.dart';
import 'package:amap_flutter_location/amap_location_option.dart';
import 'package:clipboard_listener/clipboard_listener.dart';
import 'package:dio/dio.dart';
import 'package:extended_image/extended_image.dart';
@ -97,7 +98,7 @@ class ClipboardListenerValue {
class _HomePageState extends BaseStoreState<HomePage>
with TickerProviderStateMixin, WidgetsBindingObserver {
Location _weatherLocation;
Map<String, Object> _weatherLocation;
TabController _tabController;
int _tabIndex = 0;
@ -152,6 +153,16 @@ class _HomePageState extends BaseStoreState<HomePage>
@override
void initState() {
super.initState();
requestPermission().then((value) {
if (value) {
AMapFlutterLocation().setLocationOption(AMapLocationOption());
AMapFlutterLocation().startLocation();
AMapFlutterLocation().onLocationChanged().listen((event) {
_weatherLocation = event;
});
}
});
//
_mobShareInit();
//
@ -252,6 +263,8 @@ class _HomePageState extends BaseStoreState<HomePage>
@override
void dispose() {
_tabController.dispose();
AMapFlutterLocation().stopLocation();
AMapFlutterLocation().destroy();
WidgetsBinding.instance.removeObserver(this);
super.dispose();
}
@ -458,8 +471,8 @@ class _HomePageState extends BaseStoreState<HomePage>
},
);
String locationCityName =
_weatherLocation != null && !TextUtils.isEmpty(_weatherLocation.city)
? _weatherLocation.city
_weatherLocation != null && !TextUtils.isEmpty(_weatherLocation['city'])
? _weatherLocation['city']
: "";
try {
locationCityName = locationCityName.replaceAll("", "");
@ -1365,10 +1378,6 @@ class _HomePageState extends BaseStoreState<HomePage>
_getWeather() async {
// if (_weatherLocation==null)
if (await requestPermission())
_weatherLocation = await AmapLocation.instance.fetchLocation();
String url =
"https://tianqiapi.com/api?version=v61&appid=81622428&appsecret=AxKzYWq3";
if (_weatherCityModel != null && !TextUtils.isEmpty(_weatherCityModel.id)) {
@ -1377,9 +1386,9 @@ class _HomePageState extends BaseStoreState<HomePage>
!TextUtils.isEmpty(_weatherCityModel.cityZh)) {
url = "$url&city=${_weatherCityModel.cityZh}";
} else if (_weatherLocation != null &&
!TextUtils.isEmpty(_weatherLocation.city)) {
!TextUtils.isEmpty(_weatherLocation['city'])) {
// url = "$url&point=gaode&lng=${_weatherLocation.latLng.longitude.toString()}&lat=${_weatherLocation.latLng.latitude.toString()}";
String city = _weatherLocation.city.replaceAll("", "");
String city = (_weatherLocation['city'] as String).replaceAll("", "");
city = city.replaceAll("", "");
url = "$url&city=$city";
}

@ -8,20 +8,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "18.0.0"
amap_core_fluttify:
dependency: transitive
description:
name: amap_core_fluttify
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.0"
amap_location_fluttify:
amap_flutter_location:
dependency: "direct main"
description:
name: amap_location_fluttify
name: amap_flutter_location
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.18.0"
version: "1.0.1"
analyzer:
dependency: transitive
description:
@ -56,7 +49,7 @@ packages:
name: auto_size_text
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
version: "3.0.0-nullsafety.0"
azlistview:
dependency: "direct main"
description:
@ -225,13 +218,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.0"
core_location_fluttify:
dependency: transitive
description:
name: core_location_fluttify
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.1"
crypto:
dependency: transitive
description:
@ -273,14 +259,14 @@ packages:
name: device_info
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.0"
version: "2.0.0"
device_info_platform_interface:
dependency: transitive
description:
name: device_info_platform_interface
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.1"
version: "2.0.1"
dio:
dependency: "direct main"
description:
@ -357,7 +343,7 @@ packages:
name: file_picker
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.7"
version: "3.0.0"
fixnum:
dependency: transitive
description:
@ -397,7 +383,7 @@ packages:
name: flutter_ffmpeg
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.1"
version: "0.4.0"
flutter_gifimage:
dependency: "direct main"
description:
@ -411,7 +397,7 @@ packages:
name: flutter_highlight
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.6.0"
version: "0.7.0"
flutter_icons:
dependency: "direct main"
description:
@ -444,7 +430,7 @@ packages:
name: flutter_plugin_android_lifecycle
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.11"
version: "2.0.0"
flutter_qr_reader:
dependency: "direct main"
description:
@ -565,7 +551,7 @@ packages:
name: highlight
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.6.0"
version: "0.7.0"
hive:
dependency: "direct main"
description:
@ -628,14 +614,7 @@ packages:
name: image_picker
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.6.6+5"
image_picker_platform_interface:
dependency: transitive
description:
name: image_picker_platform_interface
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.0"
version: "0.6.2+3"
intl:
dependency: transitive
description:
@ -763,7 +742,7 @@ packages:
name: package_info
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.3+4"
version: "2.0.0"
package_signature:
dependency: "direct main"
description:
@ -893,7 +872,7 @@ packages:
name: plugin_platform_interface
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.3"
version: "2.0.0"
pointycastle:
dependency: transitive
description:
@ -913,7 +892,7 @@ packages:
description:
path: "."
ref: null-safety
resolved-ref: aba917ade1f1a2f104977dce429d0e358e26c621
resolved-ref: e07ea9aaa832772139172f2a83b5d2babc63fc7e
url: "http://159.75.73.143:8080/laiiihz/power_logger"
source: git
version: "0.1.3"
@ -1000,7 +979,42 @@ packages:
name: shared_preferences
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.5.3+4"
version: "2.0.5"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
shared_preferences_macos:
dependency: transitive
description:
name: shared_preferences_macos
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0"
sharesdk_plugin:
dependency: "direct main"
description:
@ -1130,7 +1144,7 @@ packages:
name: tobias
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.6.0+1"
version: "2.0.0-nullsafety.3"
typed_data:
dependency: transitive
description:
@ -1144,14 +1158,7 @@ packages:
name: url_launcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "5.7.10"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.1+4"
version: "5.4.0"
url_launcher_macos:
dependency: transitive
description:
@ -1165,21 +1172,14 @@ packages:
name: url_launcher_platform_interface
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.9"
version: "1.0.1"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.5+1"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.1+3"
version: "0.1.1+5"
vector_math:
dependency: transitive
description:
@ -1214,14 +1214,14 @@ packages:
name: video_thumbnail
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.5+1"
version: "0.3.1"
video_trimmer:
dependency: "direct main"
description:
path: "."
ref: HEAD
resolved-ref: "99336eabeac7332b29a4b1646119a18f3a191dee"
url: "http://192.168.2.201:8099/aku_fe/video_trimmer.git"
resolved-ref: ad8c04b159cfa7c1be2fbf73b68776beb04cd8f7
url: "http://159.75.73.143:8080/laiiihz/video_trimmer"
source: git
version: "0.3.5"
wakelock:

@ -18,7 +18,8 @@ dependencies:
timeline_tile: 0.1.2
# 高德定位
amap_location_fluttify:
# amap_location_fluttify: ^0.18.0
amap_flutter_location: ^1.0.1
# icons
flutter_icons: 1.1.0
# 拼音
@ -94,7 +95,7 @@ dependencies:
oktoast: 2.3.2
# 应用信息
package_info: ^0.4.0+16
package_info: ^2.0.0
#缓存图片
# cached_network_image: ^1.1.0
@ -126,10 +127,10 @@ dependencies:
# 源码 TobiasPlugin.m
# 判断支付宝是否安装时 源码不正确 应将 alipays 改为 alipay #########################3
#
tobias: 1.6.0+1
tobias: 2.0.0-nullsafety.3
# 小数据缓存
shared_preferences: 0.5.3+4
shared_preferences: ^2.0.5
# 屏幕适配
flutter_screenutil: ^0.5.3
@ -203,7 +204,7 @@ dependencies:
#视频剪辑
video_trimmer:
git:
url: http://192.168.2.201:8099/aku_fe/video_trimmer.git
url: http://159.75.73.143:8080/laiiihz/video_trimmer
#点赞组件
many_like: ^0.0.6
@ -226,7 +227,7 @@ dependencies:
pin_input_text_field: ^3.3.0
device_info: ^1.0.0
device_info: ^2.0.0
clipboard_listener: ^1.0.0
power_logger:
git:

Loading…
Cancel
Save