Commit a11506bb authored by tongzifang's avatar tongzifang

fix keyboard

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