update power logger version, add feedback page

hmxc
小赖 4 years ago
parent a9a59dcadd
commit f395b2d9f1

@ -1 +1 @@
1d25ad0f6dab6b4c703ddfca43e3d476 b3de84cadfa8d6fa60e695b0306683c9

@ -31,6 +31,8 @@ PODS:
- core_location_fluttify (0.0.1): - core_location_fluttify (0.0.1):
- Flutter - Flutter
- foundation_fluttify - foundation_fluttify
- device_info (0.0.1):
- Flutter
- Flutter (1.0.0) - Flutter (1.0.0)
- fluwx (0.0.1): - fluwx (0.0.1):
- Flutter - Flutter
@ -76,6 +78,7 @@ DEPENDENCIES:
- amap_map_fluttify (from `.symlinks/plugins/amap_map_fluttify/ios`) - amap_map_fluttify (from `.symlinks/plugins/amap_map_fluttify/ios`)
- amap_search_fluttify (from `.symlinks/plugins/amap_search_fluttify/ios`) - amap_search_fluttify (from `.symlinks/plugins/amap_search_fluttify/ios`)
- core_location_fluttify (from `.symlinks/plugins/core_location_fluttify/ios`) - core_location_fluttify (from `.symlinks/plugins/core_location_fluttify/ios`)
- device_info (from `.symlinks/plugins/device_info/ios`)
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- fluwx (from `.symlinks/plugins/fluwx/ios`) - fluwx (from `.symlinks/plugins/fluwx/ios`)
- foundation_fluttify (from `.symlinks/plugins/foundation_fluttify/ios`) - foundation_fluttify (from `.symlinks/plugins/foundation_fluttify/ios`)
@ -113,6 +116,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/amap_search_fluttify/ios" :path: ".symlinks/plugins/amap_search_fluttify/ios"
core_location_fluttify: core_location_fluttify:
:path: ".symlinks/plugins/core_location_fluttify/ios" :path: ".symlinks/plugins/core_location_fluttify/ios"
device_info:
:path: ".symlinks/plugins/device_info/ios"
Flutter: Flutter:
:path: Flutter :path: Flutter
fluwx: fluwx:
@ -152,6 +157,7 @@ SPEC CHECKSUMS:
AMapLocation-NO-IDFA: 2a3edfee336b38481b892e1ecc85df0f6b365851 AMapLocation-NO-IDFA: 2a3edfee336b38481b892e1ecc85df0f6b365851
AMapSearch-NO-IDFA: 85555dc9ba312949d39a259baa4ef4e0619fa944 AMapSearch-NO-IDFA: 85555dc9ba312949d39a259baa4ef4e0619fa944
core_location_fluttify: 9466a411ea7d22c6349c7e6a767ae4623f01eb1d core_location_fluttify: 9466a411ea7d22c6349c7e6a767ae4623f01eb1d
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
fluwx: 07a55ed66bf3a4961e836a2a411b02dcada32902 fluwx: 07a55ed66bf3a4961e836a2a411b02dcada32902
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a

@ -63,6 +63,9 @@ class _User {
/// ///
String get udpdateAvatar => '/user/personalData/updateHeadPortrait'; String get udpdateAvatar => '/user/personalData/updateHeadPortrait';
///app
String get feedback => '/user/feedback/submit';
} }
class _Manager { class _Manager {
@ -248,5 +251,4 @@ class _Message {
///() ///()
String get allReadComment => '/user/message/allReadComment'; String get allReadComment => '/user/message/allReadComment';
} }

@ -1,7 +1,10 @@
// Dart imports: // Dart imports:
import 'dart:io';
import 'dart:math'; import 'dart:math';
// Flutter imports: // Flutter imports:
import 'package:akuCommunity/constants/api.dart';
import 'package:akuCommunity/utils/network/net_util.dart';
import 'package:akuCommunity/widget/picker/grid_image_picker.dart'; import 'package:akuCommunity/widget/picker/grid_image_picker.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -24,6 +27,8 @@ class FeedBackPage extends StatefulWidget {
class _FeedBackPageState extends State<FeedBackPage> { class _FeedBackPageState extends State<FeedBackPage> {
TextEditingController _ideaContent = new TextEditingController(); TextEditingController _ideaContent = new TextEditingController();
GlobalKey<FormState> _formKey = GlobalKey<FormState>();
List<File> _files = [];
Widget _containerTextField() { Widget _containerTextField() {
return Container( return Container(
@ -39,6 +44,10 @@ class _FeedBackPageState extends State<FeedBackPage> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
controller: _ideaContent, controller: _ideaContent,
validator: (text) {
if (text?.isEmpty ?? true) return '意见不能为空';
return null;
},
onChanged: (String value) {}, onChanged: (String value) {},
maxLines: 10, maxLines: 10,
decoration: InputDecoration( decoration: InputDecoration(
@ -63,17 +72,22 @@ class _FeedBackPageState extends State<FeedBackPage> {
Widget _inkWellSubmit() { Widget _inkWellSubmit() {
return InkWell( return InkWell(
onTap: () { onTap: () async {
if (TextUtil.isEmpty(_ideaContent.text)) if (_formKey.currentState.validate()) {
BotToast.showText(text: '意见不能为空'); if (_files?.isNotEmpty ?? false) {
else { //TODO upload file
}
var cancelAction = BotToast.showLoading(); var cancelAction = BotToast.showLoading();
Future.delayed(Duration(milliseconds: 1000 + Random().nextInt(1000)), await NetUtil().post(
() { API.user.feedback,
BotToast.showText(text: '提交成功'); params: {
'content': _ideaContent.text,
'fileUrls': [],
},
showMessage: true,
);
cancelAction(); cancelAction();
Get.back(); Get.back();
});
} }
}, },
child: Container( child: Container(
@ -123,14 +137,19 @@ class _FeedBackPageState extends State<FeedBackPage> {
style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)), style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)),
), ),
SizedBox(height: 24.w), SizedBox(height: 24.w),
_containerTextField(), Form(
child: _containerTextField(),
key: _formKey,
),
SizedBox(height: 24.w), SizedBox(height: 24.w),
Text( Text(
'添加图片信息(0/9)', '添加图片信息(0/9)',
style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)), style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)),
), ),
SizedBox(height: 24.w), SizedBox(height: 24.w),
GridImagePicker(onChange: (files) {}), GridImagePicker(onChange: (files) {
_files = files;
}),
SizedBox(height: 76.w), SizedBox(height: 76.w),
_inkWellSubmit(), _inkWellSubmit(),
], ],

@ -836,12 +836,10 @@ packages:
power_logger: power_logger:
dependency: "direct main" dependency: "direct main"
description: description:
path: "." name: power_logger
ref: HEAD url: "https://pub.flutter-io.cn"
resolved-ref: "0436e0b02d1673ee828a757413a86999cd25603c" source: hosted
url: "http://159.75.73.143:8080/laiiihz/power_logger" version: "0.1.3"
source: git
version: "0.1.1"
pretty_json: pretty_json:
dependency: transitive dependency: transitive
description: description:

@ -2,7 +2,7 @@ name: akuCommunity
description: A new Flutter project. description: A new Flutter project.
publish_to: "none" # Remove this line if you wish to publish to pub.dev publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.1.0-dev+12 version: 1.1.10-dev+17
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"
@ -89,9 +89,7 @@ dependencies:
url: http://192.168.2.201:8099/zhangmeng/random_character.git url: http://192.168.2.201:8099/zhangmeng/random_character.git
image_picker: ^0.6.7+21 image_picker: ^0.6.7+21
power_logger: power_logger: ^0.1.3
git:
url: http://159.75.73.143:8080/laiiihz/power_logger
flutter_rating_bar: ^3.2.0+1 flutter_rating_bar: ^3.2.0+1
jpush_flutter: ^0.6.3 jpush_flutter: ^0.6.3
badges: ^1.1.6 badges: ^1.1.6

Loading…
Cancel
Save