opt search panel

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-18 17:27:40 +08:00
parent e330359192
commit 0de2603e30
8 changed files with 291 additions and 306 deletions

View File

@@ -45,6 +45,7 @@ abstract class CommonSearchPanelState<
controller: controller.scrollController,
physics: const AlwaysScrollableScrollPhysics(),
slivers: [
if (widget.searchType.hasHeader) buildHeader(theme),
Obx(() => _buildBody(theme, controller.loadingState.value)),
],
),
@@ -105,7 +106,11 @@ abstract class CommonSearchPanelState<
)
: _builLoading,
Success(:var response) => response?.isNotEmpty == true
? buildList(theme, response!)
? SliverPadding(
padding: EdgeInsets.only(
bottom: MediaQuery.paddingOf(context).bottom + 80),
sliver: buildList(theme, response!),
)
: HttpError(
onReload: controller.onReload,
),
@@ -116,5 +121,7 @@ abstract class CommonSearchPanelState<
};
}
Widget buildHeader(ThemeData theme) => throw UnimplementedError();
Widget buildList(ThemeData theme, List<T> list);
}