Commit a11506bb authored by tongzifang's avatar tongzifang

fix keyboard

parent 2aff56bd
...@@ -37,8 +37,8 @@ packages: ...@@ -37,8 +37,8 @@ packages:
dependency: transitive dependency: transitive
description: description:
path: "." path: "."
ref: "0.0.15" ref: "0.0.16"
resolved-ref: "2b71b92fb1bbe3fa4e2e9854be16e8fb7f7619df" resolved-ref: f9efd1def934d7e32cb8a6bd11faec6c556d488c
url: "https://git.zmcms.cn/publicsource/base_data_channel.git" url: "https://git.zmcms.cn/publicsource/base_data_channel.git"
source: git source: git
version: "0.0.1" version: "0.0.1"
...@@ -330,6 +330,14 @@ packages: ...@@ -330,6 +330,14 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.6.5" version: "0.6.5"
keyboard_dismisser:
dependency: transitive
description:
name: keyboard_dismisser
sha256: f67e032581fc3dd1f77e1cb54c421b089e015d122aeba2490ba001cfcc42a181
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.0"
lints: lints:
dependency: transitive dependency: transitive
description: description:
......
...@@ -17,6 +17,7 @@ import 'package:photo_manager/photo_manager.dart'; ...@@ -17,6 +17,7 @@ import 'package:photo_manager/photo_manager.dart';
import 'config/user_feedback_strings.dart'; import 'config/user_feedback_strings.dart';
import 'package:flutter_boost/flutter_boost.dart'; import 'package:flutter_boost/flutter_boost.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:keyboard_dismisser/keyboard_dismisser.dart';
class UserFeedBackPage extends StatefulWidget { class UserFeedBackPage extends StatefulWidget {
const UserFeedBackPage({Key? key}) : super(key: key); const UserFeedBackPage({Key? key}) : super(key: key);
...@@ -37,48 +38,51 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> { ...@@ -37,48 +38,51 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return KeyboardDismisser(
resizeToAvoidBottomInset: true, child: Scaffold(
backgroundColor: CommonColor.colorF5, resizeToAvoidBottomInset: true,
appBar: PageUtils.navigator(context, title: UserFeedBackString.title), backgroundColor: CommonColor.colorF5,
body: Stack( appBar: PageUtils.navigator(context, title: UserFeedBackString.title),
children: [ body: Stack(
Positioned( children: [
left: 0, Positioned(
right: 0, left: 0,
top: 0, right: 0,
bottom: 90, top: 0,
child: ListView( bottom: 90,
physics: const BouncingScrollPhysics(), child: ListView(
children: [ physics: const BouncingScrollPhysics(),
_feedbackType(), children: [
_feedbackDes(), _feedbackType(),
_feedbackImg(), _feedbackDes(),
], _feedbackImg(),
)), ],
Positioned( )),
left: 0, Positioned(
right: 0, left: 0,
bottom: 0, right: 0,
child: GestureDetector( bottom: 0,
onTap: () { child: GestureDetector(
subFeedBack(); onTap: () {
}, subFeedBack();
child: Container( },
height: 50, child: Container(
alignment: Alignment.center, height: 50,
margin: const EdgeInsets.only( alignment: Alignment.center,
left: 12, right: 12, top: 12, bottom: 30), margin: const EdgeInsets.only(
decoration: BoxDecoration( left: 12, right: 12, top: 12, bottom: 30),
borderRadius: BorderRadius.circular(4), decoration: BoxDecoration(
color: CommonColor.colorMainGreen), borderRadius: BorderRadius.circular(4),
child: Text( color: CommonColor.colorMainGreen),
UserFeedBackString.feedback_sub, child: Text(
style: TextStyle(color: CommonColor.color33, fontSize: 18), UserFeedBackString.feedback_sub,
style:
TextStyle(color: CommonColor.color33, fontSize: 18),
),
), ),
), ))
)) ],
], ),
), ),
); );
} }
...@@ -241,7 +245,7 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> { ...@@ -241,7 +245,7 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> {
), ),
), ),
SizedBox( SizedBox(
height: 90, height: 100,
child: Stack( child: Stack(
children: [ children: [
Positioned( Positioned(
...@@ -251,7 +255,7 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> { ...@@ -251,7 +255,7 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> {
bottom: 0, bottom: 0,
child: GridView.builder( child: GridView.builder(
shrinkWrap: true, shrinkWrap: true,
physics: const BouncingScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
gridDelegate: gridDelegate:
const SliverGridDelegateWithFixedCrossAxisCount( const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 4, crossAxisCount: 4,
...@@ -365,8 +369,8 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> { ...@@ -365,8 +369,8 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> {
final List<AssetPathEntity> paths = await PhotoManager.getAssetPathList(); final List<AssetPathEntity> paths = await PhotoManager.getAssetPathList();
var shotDir = paths.firstWhere((element) { var shotDir = paths.firstWhere((element) {
var tName = element.name; var tName = element.name;
return tName.toLowerCase().contains("screen") && return (tName.toLowerCase().contains("screen") &&
tName.toLowerCase().contains("shot"); tName.toLowerCase().contains("shot"))|| tName.contains("截屏");
}, orElse: () { }, orElse: () {
return AssetPathEntity(id: '', name: ''); return AssetPathEntity(id: '', name: '');
}); });
...@@ -378,7 +382,8 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> { ...@@ -378,7 +382,8 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> {
setState(() {}); setState(() {});
}); });
} }
} else {} } else {
}
} }
getLostData(int pos) async { getLostData(int pos) async {
...@@ -516,8 +521,8 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> { ...@@ -516,8 +521,8 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> {
if (_countdownTime < 1) { if (_countdownTime < 1) {
_timer?.cancel(); _timer?.cancel();
_timer = null; _timer = null;
BoostNavigator.instance.pop(); Navigator.pop(context);
BoostNavigator.instance.pop(); Navigator.pop(context);
} else { } else {
_countdownTime -= 1; _countdownTime -= 1;
finishNotifier.value = _countdownTime; finishNotifier.value = _countdownTime;
......
...@@ -18,7 +18,7 @@ dependencies: ...@@ -18,7 +18,7 @@ dependencies:
# path: /Users/tongzi/AndroidStudioProjects/base_data_channel # path: /Users/tongzi/AndroidStudioProjects/base_data_channel
git: git:
url: https://git.zmcms.cn/publicsource/base_data_channel.git url: https://git.zmcms.cn/publicsource/base_data_channel.git
ref: 0.0.15 ref: 0.0.16
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