|
|
@@ -75,7 +75,14 @@ class ChatPage extends BasePage<ChatController> {
|
|
|
child: Container(
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
|
|
child: Obx(() {
|
|
|
- return SmartRefresher(
|
|
|
+ return NotificationListener<ScrollNotification>(
|
|
|
+ onNotification: (scrollNotification) {
|
|
|
+ if (scrollNotification is ScrollStartNotification) {
|
|
|
+ FocusScope.of(context).unfocus();
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ },
|
|
|
+ child: SmartRefresher(
|
|
|
controller: controller.refreshController,
|
|
|
footer: CustomFooter(
|
|
|
loadStyle: LoadStyle.ShowWhenLoading,
|
|
|
@@ -99,19 +106,13 @@ class ChatPage extends BasePage<ChatController> {
|
|
|
enablePullUp: true,
|
|
|
onLoading: controller.loadMoreHistory,
|
|
|
onRefresh: controller.loadMoreHistory,
|
|
|
- child: NotificationListener<ScrollNotification>(
|
|
|
- onNotification: (scrollNotification) {
|
|
|
- if (scrollNotification is ScrollStartNotification) {
|
|
|
- FocusScope.of(context).unfocus();
|
|
|
- }
|
|
|
- return false;
|
|
|
- },
|
|
|
- child: ListView.builder(
|
|
|
- reverse: true,
|
|
|
- controller: controller.listScrollController,
|
|
|
- itemBuilder: _chatItemBuilder,
|
|
|
- itemCount: controller.chatItems.length),
|
|
|
- ));
|
|
|
+ child: ListView.builder(
|
|
|
+ reverse: true,
|
|
|
+ controller: controller.listScrollController,
|
|
|
+ itemBuilder: _chatItemBuilder,
|
|
|
+ itemCount: controller.chatItems.length),
|
|
|
+ ),
|
|
|
+ );
|
|
|
}),
|
|
|
)),
|
|
|
Container(
|