hyzp_ybqx-Commit167:解决在下列页面 hysh_content_new.dart、fhycx_content_new.dart、tsjj_content_new.dart、today_list_zpjl_content_new.dart 中,当图片组件缩放后,点击文本输入框软键盘弹起遮挡文本输入框组件的问题

全局搜索“ScrollPhysics scrollPhysics”,需要修改4个文件内容:

hysh_content_new.dart				131
fhycx_content_new.dart				137
tsjj_content_new.dart				602
today_list_zpjl_content_new.dart	147
master
WinUser01 4 years ago
parent 8150e6e517
commit cf64c2e83b

@ -135,6 +135,11 @@ class _FhycxPageState extends State<FhycxContentNew> {
// 使 my_flutter_drag_scale Listview // 使 my_flutter_drag_scale Listview
ScrollPhysics scrollPhysics; ScrollPhysics scrollPhysics;
// scrollPhysics0 PageScrollPhysics()
// scrollPhysics0 AlwaysScrollableScrollPhysics()
ScrollPhysics scrollPhysics0 = AlwaysScrollableScrollPhysics();
bool bZoomedInit = true; // bool bZoomedInit = true; //
Widget getNetworkImage(String url) { Widget getNetworkImage(String url) {
return CachedNetworkImage( return CachedNetworkImage(
@ -150,13 +155,13 @@ class _FhycxPageState extends State<FhycxContentNew> {
scaleChangedCallback: (ScaleChangedModel model) { scaleChangedCallback: (ScaleChangedModel model) {
print("model.scale = ${model.scale}"); print("model.scale = ${model.scale}");
bZoomedInit = (1.0 == model.scale); bZoomedInit = (1.0 == model.scale);
scrollPhysics = PageScrollPhysics(); scrollPhysics = scrollPhysics0;
setState(() {}); setState(() {});
}, },
pointerDownCallback: () { pointerDownCallback: () {
if (bZoomedInit) { if (bZoomedInit) {
if (scrollPhysics != PageScrollPhysics()) { if (scrollPhysics != PageScrollPhysics()) {
scrollPhysics = PageScrollPhysics(); scrollPhysics = scrollPhysics0;
setState(() {}); setState(() {});
} }
} else { } else {
@ -167,7 +172,7 @@ class _FhycxPageState extends State<FhycxContentNew> {
} }
}, },
pointerUpCallback: () { pointerUpCallback: () {
scrollPhysics = PageScrollPhysics(); scrollPhysics = scrollPhysics0;
setState(() {}); setState(() {});
}, },
); );

@ -145,6 +145,11 @@ class _LoginPageState extends State<TsjjContentNew> with SingleTickerProviderSta
// 使 my_flutter_drag_scale Listview // 使 my_flutter_drag_scale Listview
ScrollPhysics scrollPhysics; ScrollPhysics scrollPhysics;
// scrollPhysics0 PageScrollPhysics()
// scrollPhysics0 AlwaysScrollableScrollPhysics()
ScrollPhysics scrollPhysics0 = AlwaysScrollableScrollPhysics();
bool bZoomedInit = true; // bool bZoomedInit = true; //
Widget getNetworkImage(String url) { Widget getNetworkImage(String url) {
return CachedNetworkImage( return CachedNetworkImage(
@ -160,13 +165,13 @@ class _LoginPageState extends State<TsjjContentNew> with SingleTickerProviderSta
scaleChangedCallback: (ScaleChangedModel model) { scaleChangedCallback: (ScaleChangedModel model) {
print("model.scale = ${model.scale}"); print("model.scale = ${model.scale}");
bZoomedInit = (1.0 == model.scale); bZoomedInit = (1.0 == model.scale);
scrollPhysics = PageScrollPhysics(); scrollPhysics = scrollPhysics0;
setState(() {}); setState(() {});
}, },
pointerDownCallback: () { pointerDownCallback: () {
if (bZoomedInit) { if (bZoomedInit) {
if (scrollPhysics != PageScrollPhysics()) { if (scrollPhysics != PageScrollPhysics()) {
scrollPhysics = PageScrollPhysics(); scrollPhysics = scrollPhysics0;
setState(() {}); setState(() {});
} }
} else { } else {
@ -177,7 +182,7 @@ class _LoginPageState extends State<TsjjContentNew> with SingleTickerProviderSta
} }
}, },
pointerUpCallback: () { pointerUpCallback: () {
scrollPhysics = PageScrollPhysics(); scrollPhysics = scrollPhysics0;
setState(() {}); setState(() {});
}, },
); );

@ -129,6 +129,11 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContentNew> {
// 使 my_flutter_drag_scale Listview // 使 my_flutter_drag_scale Listview
ScrollPhysics scrollPhysics; ScrollPhysics scrollPhysics;
// scrollPhysics0 PageScrollPhysics()
// scrollPhysics0 AlwaysScrollableScrollPhysics()
ScrollPhysics scrollPhysics0 = AlwaysScrollableScrollPhysics();
bool bZoomedInit = true; // bool bZoomedInit = true; //
Widget getNetworkImage(String url) { Widget getNetworkImage(String url) {
return CachedNetworkImage( return CachedNetworkImage(
@ -144,13 +149,13 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContentNew> {
scaleChangedCallback: (ScaleChangedModel model) { scaleChangedCallback: (ScaleChangedModel model) {
print("model.scale = ${model.scale}"); print("model.scale = ${model.scale}");
bZoomedInit = (1.0 == model.scale); bZoomedInit = (1.0 == model.scale);
scrollPhysics = PageScrollPhysics(); scrollPhysics = scrollPhysics0;
setState(() {}); setState(() {});
}, },
pointerDownCallback: () { pointerDownCallback: () {
if (bZoomedInit) { if (bZoomedInit) {
if (scrollPhysics != PageScrollPhysics()) { if (scrollPhysics != PageScrollPhysics()) {
scrollPhysics = PageScrollPhysics(); scrollPhysics = scrollPhysics0;
setState(() {}); setState(() {});
} }
} else { } else {
@ -161,7 +166,7 @@ class _TodayListZpjlPageState extends State<TodayListZpjlContentNew> {
} }
}, },
pointerUpCallback: () { pointerUpCallback: () {
scrollPhysics = PageScrollPhysics(); scrollPhysics = scrollPhysics0;
setState(() {}); setState(() {});
}, },
); );

Loading…
Cancel
Save