mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
@@ -9,7 +9,6 @@ import 'package:PiliPlus/common/widgets/pair.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_feed_index/card_data_list_item.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_feed_index/card_list.dart';
|
||||
import 'package:PiliPlus/pages/common/common_page.dart';
|
||||
import 'package:PiliPlus/pages/live/controller.dart';
|
||||
import 'package:PiliPlus/pages/live/widgets/live_item_app.dart';
|
||||
import 'package:PiliPlus/pages/live_area/view.dart';
|
||||
@@ -30,10 +29,9 @@ class LivePage extends StatefulWidget {
|
||||
State<LivePage> createState() => _LivePageState();
|
||||
}
|
||||
|
||||
class _LivePageState extends CommonPageState<LivePage, LiveController>
|
||||
class _LivePageState extends State<LivePage>
|
||||
with AutomaticKeepAliveClientMixin {
|
||||
@override
|
||||
LiveController controller = Get.put(LiveController());
|
||||
final LiveController controller = Get.put(LiveController());
|
||||
|
||||
@override
|
||||
bool get wantKeepAlive => true;
|
||||
@@ -50,31 +48,29 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
||||
Widget build(BuildContext context) {
|
||||
super.build(context);
|
||||
final ThemeData theme = Theme.of(context);
|
||||
return onBuild(
|
||||
Container(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
margin: const EdgeInsets.symmetric(horizontal: StyleString.safeSpace),
|
||||
decoration: const BoxDecoration(borderRadius: StyleString.mdRadius),
|
||||
child: refreshIndicator(
|
||||
onRefresh: controller.onRefresh,
|
||||
child: CustomScrollView(
|
||||
controller: controller.scrollController,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
SliverPadding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: StyleString.cardSpace,
|
||||
bottom: 100,
|
||||
),
|
||||
sliver: SliverMainAxisGroup(
|
||||
slivers: [
|
||||
Obx(() => _buildTop(theme, controller.topState.value)),
|
||||
Obx(() => _buildBody(theme, controller.loadingState.value)),
|
||||
],
|
||||
),
|
||||
return Container(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
margin: const EdgeInsets.symmetric(horizontal: StyleString.safeSpace),
|
||||
decoration: const BoxDecoration(borderRadius: StyleString.mdRadius),
|
||||
child: refreshIndicator(
|
||||
onRefresh: controller.onRefresh,
|
||||
child: CustomScrollView(
|
||||
controller: controller.scrollController,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
SliverPadding(
|
||||
padding: const EdgeInsets.only(
|
||||
top: StyleString.cardSpace,
|
||||
bottom: 100,
|
||||
),
|
||||
],
|
||||
),
|
||||
sliver: SliverMainAxisGroup(
|
||||
slivers: [
|
||||
Obx(() => _buildTop(theme, controller.topState.value)),
|
||||
Obx(() => _buildBody(theme, controller.loadingState.value)),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user