mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-08-03 01:00:14 +08:00
@@ -2,6 +2,7 @@ import 'package:PiliPlus/common/skeleton/space_opus.dart';
|
||||
import 'package:PiliPlus/common/style.dart';
|
||||
import 'package:PiliPlus/common/widgets/flutter/refresh_indicator.dart';
|
||||
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
||||
import 'package:PiliPlus/common/widgets/scaffold/simple_scaffold.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_opus/item.dart';
|
||||
import 'package:PiliPlus/pages/common/fab_mixin.dart';
|
||||
@@ -54,44 +55,42 @@ class _MemberOpusState extends State<MemberOpus>
|
||||
Widget build(BuildContext context) {
|
||||
super.build(context);
|
||||
final bottom = MediaQuery.viewPaddingOf(context).bottom;
|
||||
return Stack(
|
||||
clipBehavior: .none,
|
||||
children: [
|
||||
refreshIndicator(
|
||||
onRefresh: _controller.onRefresh,
|
||||
child: fabAnimWrapper(
|
||||
child: CustomScrollView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
SliverPadding(
|
||||
padding: EdgeInsets.only(
|
||||
top: widget.isSingle ? 12 : 0,
|
||||
left: Style.safeSpace,
|
||||
right: Style.safeSpace,
|
||||
bottom: bottom + 100,
|
||||
),
|
||||
sliver: Obx(() => _buildBody(_controller.loadingState.value)),
|
||||
return ScaffoldLayout(
|
||||
body: refreshIndicator(
|
||||
onRefresh: _controller.onRefresh,
|
||||
child: fabAnimWrapper(
|
||||
child: CustomScrollView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
SliverPadding(
|
||||
padding: EdgeInsets.only(
|
||||
top: widget.isSingle ? 12 : 0,
|
||||
left: Style.safeSpace,
|
||||
right: Style.safeSpace,
|
||||
bottom: bottom + 100,
|
||||
),
|
||||
],
|
||||
),
|
||||
sliver: Obx(() => _buildBody(_controller.loadingState.value)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (_controller.filter?.isNotEmpty == true)
|
||||
Positioned(
|
||||
right: kFloatingActionButtonMargin,
|
||||
bottom: 0,
|
||||
child: SlideTransition(
|
||||
),
|
||||
fab: _controller.filter?.isNotEmpty == true
|
||||
? SlideTransition(
|
||||
position: fabAnimation,
|
||||
child: Padding(
|
||||
padding: .only(
|
||||
bottom: bottom + kFloatingActionButtonMargin,
|
||||
right: kFloatingActionButtonMargin,
|
||||
bottom: kFloatingActionButtonMargin + bottom,
|
||||
),
|
||||
child: FloatingActionButton.extended(
|
||||
onPressed: () => showDialog(
|
||||
context: context,
|
||||
builder: (context) => SimpleDialog(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 12),
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
vertical: 12,
|
||||
),
|
||||
children: _controller.filter!
|
||||
.map(
|
||||
(e) => ListTile(
|
||||
@@ -126,9 +125,8 @@ class _MemberOpusState extends State<MemberOpus>
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: null,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user