提交 bb7bbfa5 authored 作者: maodou's avatar maodou

1:搜索页搜索结果为空的时新增无图书内容提示

上级 e62703f8
......@@ -50,7 +50,9 @@ class _SearchPageState extends State<SearchPage> {
)
],
),
body: buildListView(controller),
body:
buildListView(controller),
),
);
}
......@@ -61,6 +63,24 @@ class _SearchPageState extends State<SearchPage> {
return BuildHistory(controller: controller);
} else {
// 如果条件为false,显示搜索到的书籍
if(controller.books.isEmpty){
return
SingleChildScrollView(
child:Container(
padding: EdgeInsets.only(top: 110.w),
alignment: Alignment.center,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 152.w, width: 195.w,
child: Image.asset( 'assets/images/none.png',),),
SizedBox(height: 13.w,),
Text('暂无图书,请检查输入内容',style: TextStyle(fontSize: 14.w,color: Colours.c9),),
],
),
),
);
}else{
return ListView.builder(
// shrinkWrap: true,
// physics: NeverScrollableScrollPhysics(),
......@@ -84,6 +104,8 @@ class _SearchPageState extends State<SearchPage> {
);
});
}
}
}
hideSoftKeyboard(BuildContext context) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论