hyzp_ybqx-Commit166:解决在审核页面hysh_content_new.dart,当图片组件缩放后,点击文本输入框软键盘弹起遮挡文本输入框组件的问题

// 若 scrollPhysics0 赋值为 PageScrollPhysics(),图片组件缩放后,点击文本输入框软键盘弹起会遮挡文本输入框组件
  // 将 scrollPhysics0 赋值为 AlwaysScrollableScrollPhysics(),问题解决
  ScrollPhysics scrollPhysics0 = AlwaysScrollableScrollPhysics();
master
WinUser01 4 years ago
parent a975cef186
commit 8150e6e517

@ -596,6 +596,11 @@ class _HyshPageState extends State<HyshContentNew> with SingleTickerProviderStat
// 使 my_flutter_drag_scale Listview
ScrollPhysics scrollPhysics;
// scrollPhysics0 PageScrollPhysics()
// scrollPhysics0 AlwaysScrollableScrollPhysics()
ScrollPhysics scrollPhysics0 = AlwaysScrollableScrollPhysics();
bool bZoomedInit = true; //
Widget getNetworkImage(String url) {
return CachedNetworkImage(
@ -611,13 +616,13 @@ class _HyshPageState extends State<HyshContentNew> with SingleTickerProviderStat
scaleChangedCallback: (ScaleChangedModel model) {
print("model.scale = ${model.scale}");
bZoomedInit = (1.0 == model.scale);
scrollPhysics = PageScrollPhysics();
scrollPhysics = scrollPhysics0;
setState(() {});
},
pointerDownCallback: () {
if (bZoomedInit) {
if (scrollPhysics != PageScrollPhysics()) {
scrollPhysics = PageScrollPhysics();
scrollPhysics = scrollPhysics0;
setState(() {});
}
} else {
@ -628,7 +633,7 @@ class _HyshPageState extends State<HyshContentNew> with SingleTickerProviderStat
}
},
pointerUpCallback: () {
scrollPhysics = PageScrollPhysics();
scrollPhysics = scrollPhysics0;
setState(() {});
},
);
@ -924,70 +929,75 @@ class _HyshPageState extends State<HyshContentNew> with SingleTickerProviderStat
),
//: Container(),
//type 'Container' is not a subtype of type 'PreferredSizeWidget'
body: listGetZpjl.isNotEmpty
? TabBarView(
controller: _tabController,
//TabControllertab
physics: NeverScrollableScrollPhysics(),
//TabBarViewTabBarView-OK
// children:
// (topTabs_map['listView_List'].isNotEmpty) ? topTabs_map['listView_List'] : [],
// https://blog.csdn.net/shulianghan/article/details/104953053
//
// int length :
// E generator(int index) : , index
// List list_generate = List.generate(3, ( index ) => index * 3);
// children: List.generate(3, (index) => Container()),
children: List.generate(topTabs_map['listView_List'].length, (index) {
return ListView(
// physics: NeverScrollableScrollPhysics(), // ListView
// physics: null, // ListView
physics: scrollPhysics,
children: [
Container(
decoration: new BoxDecoration(
color: Color.fromRGBO(244, 244, 244, 1),
),
child: Column(
children: <Widget>[
//1
getHdAndPlay(index),
//2
getWztp(index),
SizedBox(height: ScreenUtil().setHeight(_marginVer)),
//3
getWztpSmxx(index),
SizedBox(height: ScreenUtil().setHeight(_marginVer)),
//4
widget.hyshlx == 'hyfh' ? getHycsResult(index) : SizedBox.shrink(),
//RadioRadioListItems
//5-6
HyshGroup(
index: index,
hyshlx: hyshlx,
fontSize: _fontSize,
size: Size(_listTileHeight, _listTileHeight),
id: widget.id,
selectedRadio:
hyshlx == 'hyfh' && mapGetHycsShenheData['title'] == "非黑烟车"
? 1
: 0,
),
//RadioRadioListItems
// SizedBox(height: 6),
// Divider(height: 1.0, color: Colors.blue),
// SizedBox(height: 10),
// //9
// getShqr(index),
],
body: GestureDetector(
onTap: () {
FocusScope.of(context).requestFocus(FocusNode());
},
child: listGetZpjl.isNotEmpty
? TabBarView(
controller: _tabController,
//TabControllertab
physics: NeverScrollableScrollPhysics(),
//TabBarViewTabBarView-OK
// children:
// (topTabs_map['listView_List'].isNotEmpty) ? topTabs_map['listView_List'] : [],
// https://blog.csdn.net/shulianghan/article/details/104953053
//
// int length :
// E generator(int index) : , index
// List list_generate = List.generate(3, ( index ) => index * 3);
// children: List.generate(3, (index) => Container()),
children: List.generate(topTabs_map['listView_List'].length, (index) {
return ListView(
// physics: NeverScrollableScrollPhysics(), // ListView
// physics: null, // ListView
physics: scrollPhysics,
children: [
Container(
decoration: new BoxDecoration(
color: Color.fromRGBO(244, 244, 244, 1),
),
child: Column(
children: <Widget>[
//1
getHdAndPlay(index),
//2
getWztp(index),
SizedBox(height: ScreenUtil().setHeight(_marginVer)),
//3
getWztpSmxx(index),
SizedBox(height: ScreenUtil().setHeight(_marginVer)),
//4
widget.hyshlx == 'hyfh' ? getHycsResult(index) : SizedBox.shrink(),
//RadioRadioListItems
//5-6
HyshGroup(
index: index,
hyshlx: hyshlx,
fontSize: _fontSize,
size: Size(_listTileHeight, _listTileHeight),
id: widget.id,
selectedRadio:
hyshlx == 'hyfh' && mapGetHycsShenheData['title'] == "非黑烟车"
? 1
: 0,
),
//RadioRadioListItems
// SizedBox(height: 6),
// Divider(height: 1.0, color: Colors.blue),
// SizedBox(height: 10),
// //9
// getShqr(index),
],
),
),
),
],
);
}),
)
: getMoreWidget(color: Colors.black38, size: 20.0, strokeWidth: 2.0), //
],
);
}),
)
: getMoreWidget(color: Colors.black38, size: 20.0, strokeWidth: 2.0), //
),
),
),
);

Loading…
Cancel
Save