mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-22 03:31:09 +08:00
opt search panel
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user