Commit 02129636 authored by tongzifang's avatar tongzifang

finish

parent bb454aad
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:requestLegacyExternalStorage="true"
android:theme="@style/LaunchTheme" android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
......
...@@ -7,6 +7,7 @@ import Foundation ...@@ -7,6 +7,7 @@ import Foundation
import base_data_channel import base_data_channel
import path_provider_foundation import path_provider_foundation
import photo_manager
import qmsd_flutter_user_feedback import qmsd_flutter_user_feedback
import shared_preferences_foundation import shared_preferences_foundation
import sqflite import sqflite
...@@ -14,6 +15,7 @@ import sqflite ...@@ -14,6 +15,7 @@ import sqflite
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
BaseDataChannelPlugin.register(with: registry.registrar(forPlugin: "BaseDataChannelPlugin")) BaseDataChannelPlugin.register(with: registry.registrar(forPlugin: "BaseDataChannelPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
PhotoManagerPlugin.register(with: registry.registrar(forPlugin: "PhotoManagerPlugin"))
QmsdFlutterUserFeedbackPlugin.register(with: registry.registrar(forPlugin: "QmsdFlutterUserFeedbackPlugin")) QmsdFlutterUserFeedbackPlugin.register(with: registry.registrar(forPlugin: "QmsdFlutterUserFeedbackPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
......
...@@ -36,11 +36,9 @@ packages: ...@@ -36,11 +36,9 @@ packages:
base_data_channel: base_data_channel:
dependency: transitive dependency: transitive
description: description:
path: "." path: "/Users/tongzi/AndroidStudioProjects/base_data_channel"
ref: "0.0.12" relative: false
resolved-ref: "7794207cfba03e634b69f3dd35276d88c9fac929" source: path
url: "git@git.zmcms.cn:fht/base_data_channel.git"
source: git
version: "0.0.1" version: "0.0.1"
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
...@@ -466,6 +464,14 @@ packages: ...@@ -466,6 +464,14 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.11.1" version: "1.11.1"
photo_manager:
dependency: transitive
description:
name: photo_manager
sha256: bdc4ab1fa9fb064d8ccfea6ab44119f55b220293d7ce2e19eb5a5f998db86c88
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.6.0"
pigeon: pigeon:
dependency: transitive dependency: transitive
description: description:
......
...@@ -12,6 +12,7 @@ import 'package:flutter/material.dart'; ...@@ -12,6 +12,7 @@ import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
import 'package:qmsd_flutter_user_feedback/config/user_feedback_imgs.dart'; import 'package:qmsd_flutter_user_feedback/config/user_feedback_imgs.dart';
import 'package:qmsd_flutter_user_feedback/request/user_feedback_client.dart'; import 'package:qmsd_flutter_user_feedback/request/user_feedback_client.dart';
import 'package:photo_manager/photo_manager.dart';
import 'config/user_feedback_strings.dart'; import 'config/user_feedback_strings.dart';
...@@ -75,6 +76,12 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> { ...@@ -75,6 +76,12 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> {
); );
} }
@override
void initState() {
super.initState();
_getLastScreenShot();
}
_feedbackType() { _feedbackType() {
return Container( return Container(
margin: const EdgeInsets.all(12), margin: const EdgeInsets.all(12),
...@@ -306,6 +313,28 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> { ...@@ -306,6 +313,28 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> {
); );
} }
_getLastScreenShot() async {
final PermissionState _ps = await PhotoManager.requestPermissionExtend();
if (_ps.isAuth) {
final List<AssetPathEntity> paths = await PhotoManager.getAssetPathList();
var shotDir = paths.firstWhere((element) {
var tName = element.name;
return tName.toLowerCase().contains("screen") &&
tName.toLowerCase().contains("shot");
}, orElse: () {
return AssetPathEntity(id: '', name: '');
});
if (shotDir.id.isNotEmpty) {
final List<AssetEntity> entities =
await shotDir.getAssetListPaged(page: 0, size: 5);
entities.first.file.then((value) {
imgFeed.add(XFile(value?.path ?? ""));
setState(() {});
});
}
} else {}
}
getLostData(int pos) async { getLostData(int pos) async {
final ImagePicker picker = ImagePicker(); final ImagePicker picker = ImagePicker();
final XFile? image = final XFile? image =
...@@ -339,7 +368,7 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> { ...@@ -339,7 +368,7 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> {
.subFeedBack(_feedType, _controller.text, urls); .subFeedBack(_feedType, _controller.text, urls);
if (model.status == true) { if (model.status == true) {
QmToast.toast("提交成功!"); QmToast.toast("提交成功!");
}else { } else {
QmToast.toast("提交失败!"); QmToast.toast("提交失败!");
} }
} catch (e) { } catch (e) {
......
...@@ -15,10 +15,10 @@ dependencies: ...@@ -15,10 +15,10 @@ dependencies:
plugin_platform_interface: ^2.0.2 plugin_platform_interface: ^2.0.2
logger: any logger: any
base_data_channel: base_data_channel:
# path: /Users/tongzi/AndroidStudioProjects/base_data_channel path: /Users/tongzi/AndroidStudioProjects/base_data_channel
git: # git:
url: git@git.zmcms.cn:fht/base_data_channel.git # url: git@git.zmcms.cn:fht/base_data_channel.git
ref: 0.0.12 # ref: 0.0.13
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment