opt pages

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-31 11:22:11 +08:00
parent 132a7e15de
commit 4ac05caa28
14 changed files with 236 additions and 240 deletions

View File

@@ -15,6 +15,7 @@ import 'package:PiliPlus/models/pgc/pgc_rank/pgc_rank_item_model.dart';
import 'package:PiliPlus/models/pgc_lcf.dart'; import 'package:PiliPlus/models/pgc_lcf.dart';
import 'package:PiliPlus/models/play_info/data.dart'; import 'package:PiliPlus/models/play_info/data.dart';
import 'package:PiliPlus/models/triple/pgc_triple.dart'; import 'package:PiliPlus/models/triple/pgc_triple.dart';
import 'package:PiliPlus/models/triple/ugc_triple.dart';
import 'package:PiliPlus/models/user/fav_folder.dart'; import 'package:PiliPlus/models/user/fav_folder.dart';
import 'package:PiliPlus/models/video/ai.dart'; import 'package:PiliPlus/models/video/ai.dart';
import 'package:PiliPlus/models/video/note_list/data.dart'; import 'package:PiliPlus/models/video/note_list/data.dart';
@@ -428,7 +429,7 @@ class VideoHttp {
), ),
); );
if (res.data['code'] == 0) { if (res.data['code'] == 0) {
return {'status': true, 'data': res.data['data']}; return {'status': true, 'data': UgcTriple.fromJson(res.data['data'])};
} else { } else {
return {'status': false, 'msg': res.data['message']}; return {'status': false, 'msg': res.data['message']};
} }

View File

@@ -141,39 +141,32 @@ class _BangumiPageState extends CommonPageState<BangumiPage, BangumiController>
], ],
), ),
Expanded( Expanded(
child: MediaQuery.removePadding( child: TabBarView(
context: context, physics: const NeverScrollableScrollPhysics(),
removeLeft: children: response.map((item) {
context.orientation == Orientation.landscape, if (item.episodes!.isNullOrEmpty) {
child: TabBarView( return const SizedBox.shrink();
physics: const NeverScrollableScrollPhysics(), }
children: response.map((item) { return ListView.builder(
if (item.episodes!.isNullOrEmpty) { physics: const AlwaysScrollableScrollPhysics(),
return const SizedBox.shrink(); scrollDirection: Axis.horizontal,
} itemCount: item.episodes!.length,
return ListView.builder( itemBuilder: (context, index) {
physics: return Container(
const AlwaysScrollableScrollPhysics(), width: Grid.smallCardWidth / 2,
scrollDirection: Axis.horizontal, margin: EdgeInsets.only(
itemCount: item.episodes!.length, left: StyleString.safeSpace,
itemBuilder: (context, index) { right: index == item.episodes!.length - 1
return Container( ? StyleString.safeSpace
width: Grid.smallCardWidth / 2, : 0,
margin: EdgeInsets.only( ),
left: StyleString.safeSpace, child: BangumiCardVTimeline(
right: item: item.episodes![index],
index == item.episodes!.length - 1 ),
? StyleString.safeSpace );
: 0, },
), );
child: BangumiCardVTimeline( }).toList()),
item: item.episodes![index],
),
);
},
);
}).toList()),
),
), ),
], ],
), ),
@@ -347,15 +340,11 @@ class _BangumiPageState extends CommonPageState<BangumiPage, BangumiController>
? Column( ? Column(
children: [ children: [
_buildFollowTitle(theme), _buildFollowTitle(theme),
MediaQuery.removePadding( SizedBox(
context: context, height: Grid.smallCardWidth / 2 / 0.75 +
removeLeft: context.orientation == Orientation.landscape, MediaQuery.textScalerOf(context).scale(50),
child: SizedBox( child: Obx(
height: Grid.smallCardWidth / 2 / 0.75 + () => _buildFollowBody(controller.followState.value),
MediaQuery.textScalerOf(context).scale(50),
child: Obx(
() => _buildFollowBody(controller.followState.value),
),
), ),
), ),
], ],

View File

@@ -227,7 +227,7 @@ abstract class CommonPublishPageState<T extends CommonPublishPage>
Widget? get customPanel => null; Widget? get customPanel => null;
Widget buildEmojiPickerPanel() { Widget buildEmojiPickerPanel() {
double height = 170; double height = context.isTablet ? 300 : 170;
final keyboardHeight = controller.keyboardHeight; final keyboardHeight = controller.keyboardHeight;
if (keyboardHeight != 0) { if (keyboardHeight != 0) {
height = max(height, keyboardHeight); height = max(height, keyboardHeight);

View File

@@ -46,13 +46,13 @@ class _ContactPageState extends State<ContactPage>
actions: [ actions: [
IconButton( IconButton(
onPressed: () async { onPressed: () async {
UserModel? userModel = await Get.dialog( UserModel? userModel = await Navigator.of(context).push(
FollowSearchPage( GetPageRoute(
mid: mid, page: () => FollowSearchPage(
isFromSelect: widget.isFromSelect, mid: mid,
isFromSelect: widget.isFromSelect,
),
), ),
useSafeArea: false,
transitionDuration: const Duration(milliseconds: 120),
); );
if (userModel != null) { if (userModel != null) {
Get.back(result: userModel); Get.back(result: userModel);

View File

@@ -1,5 +1,3 @@
import 'package:PiliPlus/common/widgets/draggable_sheet/draggable_scrollable_sheet_dyn.dart'
show DraggableScrollableSheet;
import 'package:PiliPlus/common/widgets/scroll_physics.dart'; import 'package:PiliPlus/common/widgets/scroll_physics.dart';
import 'package:PiliPlus/models/common/dynamic/dynamics_type.dart'; import 'package:PiliPlus/models/common/dynamic/dynamics_type.dart';
import 'package:PiliPlus/models/common/dynamic/up_panel_position.dart'; import 'package:PiliPlus/models/common/dynamic/up_panel_position.dart';
@@ -42,21 +40,7 @@ class _DynamicsPageState extends State<DynamicsPage>
), ),
onPressed: () { onPressed: () {
if (_dynamicsController.isLogin.value) { if (_dynamicsController.isLogin.value) {
showModalBottomSheet( CreateDynPanel.onCreateDyn(context);
context: context,
useSafeArea: true,
isScrollControlled: true,
builder: (context) => DraggableScrollableSheet(
snap: true,
expand: false,
initialChildSize: 1,
minChildSize: 0,
maxChildSize: 1,
snapSizes: const [1],
builder: (context, scrollController) =>
CreateDynPanel(scrollController: scrollController),
),
);
} }
}, },
icon: Icon( icon: Icon(
@@ -130,6 +114,7 @@ class _DynamicsPageState extends State<DynamicsPage>
super.build(context); super.build(context);
ThemeData theme = Theme.of(context); ThemeData theme = Theme.of(context);
return Scaffold( return Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar( appBar: AppBar(
leading: upPanelPosition == UpPanelPosition.rightDrawer leading: upPanelPosition == UpPanelPosition.rightDrawer
? _createDynamicBtn(theme, false) ? _createDynamicBtn(theme, false)

View File

@@ -3,8 +3,10 @@ import 'dart:math';
import 'package:PiliPlus/common/widgets/button/icon_button.dart'; import 'package:PiliPlus/common/widgets/button/icon_button.dart';
import 'package:PiliPlus/common/widgets/button/toolbar_icon_button.dart'; import 'package:PiliPlus/common/widgets/button/toolbar_icon_button.dart';
import 'package:PiliPlus/common/widgets/custom_icon.dart'; import 'package:PiliPlus/common/widgets/custom_icon.dart';
import 'package:PiliPlus/common/widgets/draggable_sheet/draggable_scrollable_sheet_dyn.dart'
as dyn_sheet;
import 'package:PiliPlus/common/widgets/draggable_sheet/draggable_scrollable_sheet_topic.dart' import 'package:PiliPlus/common/widgets/draggable_sheet/draggable_scrollable_sheet_topic.dart'
show DraggableScrollableSheet; as topic_sheet;
import 'package:PiliPlus/common/widgets/pair.dart'; import 'package:PiliPlus/common/widgets/pair.dart';
import 'package:PiliPlus/http/dynamics.dart'; import 'package:PiliPlus/http/dynamics.dart';
import 'package:PiliPlus/models/common/publish_panel_type.dart'; import 'package:PiliPlus/models/common/publish_panel_type.dart';
@@ -28,12 +30,33 @@ class CreateDynPanel extends CommonPublishPage {
super.key, super.key,
super.imageLengthLimit = 18, super.imageLengthLimit = 18,
this.scrollController, this.scrollController,
this.topic,
}); });
final ScrollController? scrollController; final ScrollController? scrollController;
final Pair<int, String>? topic;
@override @override
State<CreateDynPanel> createState() => _CreateDynPanelState(); State<CreateDynPanel> createState() => _CreateDynPanelState();
static void onCreateDyn(BuildContext context, {Pair<int, String>? topic}) =>
showModalBottomSheet(
context: context,
useSafeArea: true,
isScrollControlled: true,
builder: (context) => dyn_sheet.DraggableScrollableSheet(
snap: true,
expand: false,
initialChildSize: 1,
minChildSize: 0,
maxChildSize: 1,
snapSizes: const [1],
builder: (context, scrollController) => CreateDynPanel(
scrollController: scrollController,
topic: topic,
),
),
);
} }
class _CreateDynPanelState extends CommonPublishPageState<CreateDynPanel> { class _CreateDynPanelState extends CommonPublishPageState<CreateDynPanel> {
@@ -41,7 +64,13 @@ class _CreateDynPanelState extends CommonPublishPageState<CreateDynPanel> {
final Rx<DateTime?> _publishTime = Rx<DateTime?>(null); final Rx<DateTime?> _publishTime = Rx<DateTime?>(null);
final Rx<ReplyOptionType> _replyOption = ReplyOptionType.allow.obs; final Rx<ReplyOptionType> _replyOption = ReplyOptionType.allow.obs;
final _titleEditCtr = TextEditingController(); final _titleEditCtr = TextEditingController();
Rx<Pair<int, String>?> topic = Rx<Pair<int, String>?>(null); final Rx<Pair<int, String>?> topic = Rx<Pair<int, String>?>(null);
@override
void initState() {
super.initState();
topic.value = widget.topic;
}
@override @override
void dispose() { void dispose() {
@@ -598,7 +627,7 @@ class _CreateDynPanelState extends CommonPublishPageState<CreateDynPanel> {
constraints: BoxConstraints( constraints: BoxConstraints(
maxWidth: min(600, context.mediaQueryShortestSide), maxWidth: min(600, context.mediaQueryShortestSide),
), ),
builder: (context) => DraggableScrollableSheet( builder: (context) => topic_sheet.DraggableScrollableSheet(
expand: false, expand: false,
snap: true, snap: true,
minChildSize: 0, minChildSize: 0,

View File

@@ -1,14 +1,17 @@
import 'package:PiliPlus/common/constants.dart'; import 'package:PiliPlus/common/constants.dart';
import 'package:PiliPlus/common/widgets/custom_icon.dart';
import 'package:PiliPlus/common/widgets/custom_sliver_persistent_header_delegate.dart'; import 'package:PiliPlus/common/widgets/custom_sliver_persistent_header_delegate.dart';
import 'package:PiliPlus/common/widgets/dynamic_sliver_appbar_medium.dart'; import 'package:PiliPlus/common/widgets/dynamic_sliver_appbar_medium.dart';
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart'; import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart'; import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
import 'package:PiliPlus/common/widgets/pair.dart';
import 'package:PiliPlus/common/widgets/refresh_indicator.dart'; import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
import 'package:PiliPlus/http/loading_state.dart'; import 'package:PiliPlus/http/loading_state.dart';
import 'package:PiliPlus/models/common/image_type.dart'; import 'package:PiliPlus/models/common/image_type.dart';
import 'package:PiliPlus/models/dynamics/dyn_topic_feed/item.dart'; import 'package:PiliPlus/models/dynamics/dyn_topic_feed/item.dart';
import 'package:PiliPlus/models/dynamics/dyn_topic_top/top_details.dart'; import 'package:PiliPlus/models/dynamics/dyn_topic_top/top_details.dart';
import 'package:PiliPlus/pages/dynamics/widgets/dynamic_panel.dart'; import 'package:PiliPlus/pages/dynamics/widgets/dynamic_panel.dart';
import 'package:PiliPlus/pages/dynamics_create/view.dart';
import 'package:PiliPlus/pages/dynamics_tab/view.dart'; import 'package:PiliPlus/pages/dynamics_tab/view.dart';
import 'package:PiliPlus/pages/dynamics_topic/controller.dart'; import 'package:PiliPlus/pages/dynamics_topic/controller.dart';
import 'package:PiliPlus/utils/grid.dart'; import 'package:PiliPlus/utils/grid.dart';
@@ -39,6 +42,24 @@ class _DynTopicPageState extends State<DynTopicPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final ThemeData theme = Theme.of(context); final ThemeData theme = Theme.of(context);
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: false,
floatingActionButton: FloatingActionButton.extended(
onPressed: () {
if (_controller.isLogin) {
CreateDynPanel.onCreateDyn(
context,
topic: Pair(
first: int.parse(_controller.topicId),
second: _controller.topicName,
),
);
} else {
SmartDialog.showToast('账号未登录');
}
},
icon: const Icon(CustomIcon.topic_tag, size: 20),
label: const Text('参与话题'),
),
body: SafeArea( body: SafeArea(
top: false, top: false,
bottom: false, bottom: false,

View File

@@ -31,49 +31,44 @@ class _HomePageState extends State<HomePage>
Widget build(BuildContext context) { Widget build(BuildContext context) {
super.build(context); super.build(context);
final theme = Theme.of(context); final theme = Theme.of(context);
return Scaffold( return Column(
appBar: AppBar(toolbarHeight: 0), children: [
body: Column( if (!_homeController.useSideBar &&
children: [ context.orientation == Orientation.portrait)
if (!_homeController.useSideBar && customAppBar(theme),
context.orientation == Orientation.portrait) if (_homeController.tabs.length > 1)
customAppBar(theme), Material(
if (_homeController.tabs.length > 1) color: theme.colorScheme.surface,
Material( child: Container(
color: theme.colorScheme.surface, height: 42,
child: Container( padding: const EdgeInsets.only(top: 4),
height: 42, child: TabBar(
padding: const EdgeInsets.only(top: 4), controller: _homeController.tabController,
child: TabBar( tabs: [for (var i in _homeController.tabs) Tab(text: i.label)],
controller: _homeController.tabController, isScrollable: true,
tabs: [ dividerColor: Colors.transparent,
for (var i in _homeController.tabs) Tab(text: i.label) dividerHeight: 0,
], enableFeedback: true,
isScrollable: true, splashBorderRadius: StyleString.mdRadius,
dividerColor: Colors.transparent, tabAlignment: TabAlignment.center,
dividerHeight: 0, onTap: (value) {
enableFeedback: true, feedBack();
splashBorderRadius: StyleString.mdRadius, if (!_homeController.tabController.indexIsChanging) {
tabAlignment: TabAlignment.center, _homeController.animateToTop();
onTap: (value) { }
feedBack(); },
if (!_homeController.tabController.indexIsChanging) {
_homeController.animateToTop();
}
},
),
), ),
)
else
const SizedBox(height: 6),
Expanded(
child: tabBarView(
controller: _homeController.tabController,
children: _homeController.tabs.map((e) => e.page).toList(),
), ),
)
else
const SizedBox(height: 6),
Expanded(
child: tabBarView(
controller: _homeController.tabController,
children: _homeController.tabs.map((e) => e.page).toList(),
), ),
], ),
), ],
); );
} }

View File

@@ -43,9 +43,7 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
margin: const EdgeInsets.only( margin: const EdgeInsets.only(
left: StyleString.safeSpace, right: StyleString.safeSpace), left: StyleString.safeSpace, right: StyleString.safeSpace),
decoration: const BoxDecoration( decoration: const BoxDecoration(borderRadius: StyleString.mdRadius),
borderRadius: StyleString.mdRadius,
),
child: refreshIndicator( child: refreshIndicator(
onRefresh: controller.onRefresh, onRefresh: controller.onRefresh,
child: CustomScrollView( child: CustomScrollView(
@@ -275,58 +273,54 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
} }
Widget _buildFollowBody(ThemeData theme, List<CardLiveItem> followList) { Widget _buildFollowBody(ThemeData theme, List<CardLiveItem> followList) {
return MediaQuery.removePadding( return SelfSizedHorizontalList(
context: context, gapSize: 5,
removeLeft: context.orientation == Orientation.landscape, childBuilder: (index) {
child: SelfSizedHorizontalList( final item = followList[index];
gapSize: 5, return SizedBox(
childBuilder: (index) { width: 65,
final item = followList[index]; child: GestureDetector(
return SizedBox( onTap: () => Get.toNamed('/liveRoom?roomid=${item.roomid}'),
width: 65, onLongPress: () {
child: GestureDetector( Feedback.forLongPress(context);
onTap: () => Get.toNamed('/liveRoom?roomid=${item.roomid}'), Get.toNamed('/member?mid=${item.uid}');
onLongPress: () { },
Feedback.forLongPress(context); child: Column(
Get.toNamed('/member?mid=${item.uid}'); mainAxisSize: MainAxisSize.min,
}, children: [
child: Column( const SizedBox(height: 8),
mainAxisSize: MainAxisSize.min, Container(
children: [ margin: const EdgeInsets.all(2),
const SizedBox(height: 8), padding: const EdgeInsets.all(2),
Container( decoration: BoxDecoration(
margin: const EdgeInsets.all(2), border: Border.all(
padding: const EdgeInsets.all(2), width: 1.5,
decoration: BoxDecoration( color: theme.colorScheme.primary,
border: Border.all( strokeAlign: BorderSide.strokeAlignOutside,
width: 1.5,
color: theme.colorScheme.primary,
strokeAlign: BorderSide.strokeAlignOutside,
),
shape: BoxShape.circle,
),
child: NetworkImgLayer(
type: ImageType.avatar,
width: 45,
height: 45,
src: item.face,
), ),
shape: BoxShape.circle,
), ),
const SizedBox(height: 4), child: NetworkImgLayer(
Text( type: ImageType.avatar,
item.uname!, width: 45,
maxLines: 1, height: 45,
overflow: TextOverflow.ellipsis, src: item.face,
style: const TextStyle(fontSize: 12),
textAlign: TextAlign.center,
), ),
], ),
), const SizedBox(height: 4),
Text(
item.uname!,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(fontSize: 12),
textAlign: TextAlign.center,
),
],
), ),
); ),
}, );
itemCount: followList.length, },
), itemCount: followList.length,
); );
} }
} }

View File

@@ -203,26 +203,25 @@ class _MainAppState extends State<MainApp>
), ),
child: Scaffold( child: Scaffold(
extendBody: true, extendBody: true,
body: Row( resizeToAvoidBottomInset: false,
mainAxisAlignment: MainAxisAlignment.center, appBar: AppBar(toolbarHeight: 0),
children: [ body: SafeArea(
if (useSideBar || !isPortrait) ...[ bottom: false,
_mainController.navigationBars.length > 1 child: Row(
? context.isTablet && GStorage.optTabletNav mainAxisAlignment: MainAxisAlignment.center,
? Column( children: [
children: [ if (useSideBar || !isPortrait) ...[
SizedBox( _mainController.navigationBars.length > 1
height: ? context.isTablet && GStorage.optTabletNav
MediaQuery.paddingOf(context).top + 50), ? Column(
userAndSearchVertical(theme), children: [
const Spacer(flex: 2), const SizedBox(height: 25),
Expanded( userAndSearchVertical(theme),
flex: 5, const Spacer(flex: 2),
child: SizedBox( Expanded(
width: 130, flex: 5,
child: MediaQuery.removePadding( child: SizedBox(
context: context, width: 130,
removeRight: true,
child: Obx( child: Obx(
() => NavigationDrawer( () => NavigationDrawer(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
@@ -253,49 +252,40 @@ class _MainAppState extends State<MainApp>
), ),
), ),
), ),
],
)
: Obx(
() => NavigationRail(
groupAlignment: 0.5,
selectedIndex:
_mainController.selectedIndex.value,
onDestinationSelected: setIndex,
labelType: NavigationRailLabelType.selected,
leading: userAndSearchVertical(theme),
destinations: _mainController.navigationBars
.map((e) => NavigationRailDestination(
label: Text(e.label),
icon: _buildIcon(type: e),
selectedIcon: _buildIcon(
type: e,
selected: true,
),
))
.toList(),
), ),
], )
) : Container(
: Obx(
() => NavigationRail(
groupAlignment: 0.5,
selectedIndex:
_mainController.selectedIndex.value,
onDestinationSelected: setIndex,
labelType: NavigationRailLabelType.selected,
leading: userAndSearchVertical(theme),
destinations: _mainController.navigationBars
.map((e) => NavigationRailDestination(
label: Text(e.label),
icon: _buildIcon(type: e),
selectedIcon: _buildIcon(
type: e,
selected: true,
),
))
.toList(),
),
)
: SafeArea(
right: false,
child: Container(
padding: const EdgeInsets.only(top: 10), padding: const EdgeInsets.only(top: 10),
width: 80, width: 80,
child: userAndSearchVertical(theme), child: userAndSearchVertical(theme),
), ),
), VerticalDivider(
VerticalDivider( width: 1,
width: 1, endIndent: MediaQuery.paddingOf(context).bottom,
indent: MediaQuery.of(context).padding.top, color: theme.colorScheme.outline.withValues(alpha: 0.06),
endIndent: MediaQuery.of(context).padding.bottom, ),
color: theme.colorScheme.outline.withValues(alpha: 0.06), ],
), Expanded(
],
Expanded(
child: SafeArea(
top: false,
bottom: false,
left: isPortrait,
child: _mainController.mainTabBarView child: _mainController.mainTabBarView
? CustomTabBarView( ? CustomTabBarView(
scrollDirection: scrollDirection:
@@ -314,8 +304,8 @@ class _MainAppState extends State<MainApp>
.toList(), .toList(),
), ),
), ),
), ],
], ),
), ),
bottomNavigationBar: useSideBar || !isPortrait bottomNavigationBar: useSideBar || !isPortrait
? null ? null

View File

@@ -42,15 +42,11 @@ class _MediaPageState extends CommonPageState<MediaPage, MediaController>
super.build(context); super.build(context);
final theme = Theme.of(context); final theme = Theme.of(context);
Color primary = theme.colorScheme.primary; Color primary = theme.colorScheme.primary;
return MediaQuery.removePadding( return Padding(
context: context, padding: const EdgeInsets.only(top: 30),
removeLeft: context.orientation == Orientation.landscape, child: Material(
child: Scaffold( color: Colors.transparent,
backgroundColor: Colors.transparent, child: ListView(
appBar: AppBar(
toolbarHeight: 30,
),
body: ListView(
controller: controller.scrollController, controller: controller.scrollController,
physics: const AlwaysScrollableScrollPhysics(), physics: const AlwaysScrollableScrollPhysics(),
children: [ children: [

View File

@@ -173,10 +173,8 @@ class _SharePanelState extends State<SharePanel> {
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
_focusNode.unfocus(); _focusNode.unfocus();
UserModel? userModel = await Get.dialog( UserModel? userModel = await Navigator.of(context).push(
const ContactPage(), GetPageRoute(page: () => const ContactPage()),
useSafeArea: false,
transitionDuration: const Duration(milliseconds: 120),
); );
if (userModel != null) { if (userModel != null) {
_userList _userList

View File

@@ -443,7 +443,7 @@ class _SponsorBlockPageState extends State<SponsorBlockPage> {
divider, divider,
SliverToBoxAdapter(child: _blockToastItem(titleStyle)), SliverToBoxAdapter(child: _blockToastItem(titleStyle)),
divider, divider,
SliverToBoxAdapter(child: _blockTrackItem(titleStyle, titleStyle)), SliverToBoxAdapter(child: _blockTrackItem(titleStyle, subTitleStyle)),
dividerL, dividerL,
SliverList.separated( SliverList.separated(
itemCount: _blockSettings.length, itemCount: _blockSettings.length,

View File

@@ -48,11 +48,9 @@ class PageUtils {
avatar: item.talkerIcon, avatar: item.talkerIcon,
)) ))
.toList()); .toList());
} else { } else if (context.mounted) {
UserModel? userModel = await Get.dialog( UserModel? userModel = await Navigator.of(context).push(
const ContactPage(), GetPageRoute(page: () => const ContactPage()),
useSafeArea: false,
transitionDuration: const Duration(milliseconds: 120),
); );
if (userModel != null) { if (userModel != null) {
selectedIndex = 0; selectedIndex = 0;