|
@@ -56,7 +56,7 @@ class QueryWidget extends StatefulWidget { //搜索栏
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
class _QueryWidgetState extends State < QueryWidget > {
|
|
class _QueryWidgetState extends State < QueryWidget > {
|
|
|
- GlobalKey _globalKey = GlobalKey();
|
|
|
|
|
|
|
+ GlobalKey _globalKey = GlobalKey();//搜索栏key
|
|
|
List < bool > statusList = [true, false, false];
|
|
List < bool > statusList = [true, false, false];
|
|
|
double inputPostX = 0;
|
|
double inputPostX = 0;
|
|
|
double inputPostY = 0;
|
|
double inputPostY = 0;
|
|
@@ -65,23 +65,6 @@ class _QueryWidgetState extends State < QueryWidget > {
|
|
|
bool showStatus = true; //提示层显示状态
|
|
bool showStatus = true; //提示层显示状态
|
|
|
String orderNo;
|
|
String orderNo;
|
|
|
|
|
|
|
|
- @override
|
|
|
|
|
- void didUpdateWidget(QueryWidget oldWidget) {
|
|
|
|
|
- // TODO: implement didUpdateWidget
|
|
|
|
|
- super.didUpdateWidget(oldWidget);
|
|
|
|
|
- WidgetsBinding.instance.addPostFrameCallback(fun);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- void fun(Duration timeStamp) {
|
|
|
|
|
- RenderObject inputObj = _globalKey.currentContext.findRenderObject();
|
|
|
|
|
- setState(() {
|
|
|
|
|
- inputWidth = inputObj.paintBounds.size.width;
|
|
|
|
|
- inputHeight = inputObj.paintBounds.size.height;
|
|
|
|
|
- inputPostX = inputObj.getTransformTo(null).getTranslation().x;
|
|
|
|
|
- inputPostY = ScreenUtil.getInstance().setWidth(20) + inputHeight;
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
@override
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
Widget build(BuildContext context) {
|
|
|
return Stack(
|
|
return Stack(
|
|
@@ -113,6 +96,15 @@ class _QueryWidgetState extends State < QueryWidget > {
|
|
|
hintStyle: TextStyle(fontSize: ScreenUtil.getInstance().setSp(26), color: Color.fromRGBO(155, 155, 155, 1)),
|
|
hintStyle: TextStyle(fontSize: ScreenUtil.getInstance().setSp(26), color: Color.fromRGBO(155, 155, 155, 1)),
|
|
|
contentPadding: EdgeInsets.fromLTRB(ScreenUtil.getInstance().setWidth(30), 0, ScreenUtil.getInstance().setWidth(30), 0)
|
|
contentPadding: EdgeInsets.fromLTRB(ScreenUtil.getInstance().setWidth(30), 0, ScreenUtil.getInstance().setWidth(30), 0)
|
|
|
),
|
|
),
|
|
|
|
|
+ onTap: (){
|
|
|
|
|
+ RenderObject inputObj = _globalKey.currentContext.findRenderObject();
|
|
|
|
|
+ setState(() {
|
|
|
|
|
+ inputWidth = inputObj.paintBounds.size.width;
|
|
|
|
|
+ inputHeight = inputObj.paintBounds.size.height;
|
|
|
|
|
+ inputPostX = inputObj.getTransformTo(null).getTranslation().x;
|
|
|
|
|
+ inputPostY = ScreenUtil.getInstance().setWidth(20) + inputHeight;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
onChanged: ((value) {
|
|
onChanged: ((value) {
|
|
|
setState(() {
|
|
setState(() {
|
|
|
orderNo = value;
|
|
orderNo = value;
|