mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-17 23:56:13 +08:00
@@ -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']};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,10 +141,6 @@ class _BangumiPageState extends CommonPageState<BangumiPage, BangumiController>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: MediaQuery.removePadding(
|
|
||||||
context: context,
|
|
||||||
removeLeft:
|
|
||||||
context.orientation == Orientation.landscape,
|
|
||||||
child: TabBarView(
|
child: TabBarView(
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
children: response.map((item) {
|
children: response.map((item) {
|
||||||
@@ -152,8 +148,7 @@ class _BangumiPageState extends CommonPageState<BangumiPage, BangumiController>
|
|||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
physics:
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
const AlwaysScrollableScrollPhysics(),
|
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
itemCount: item.episodes!.length,
|
itemCount: item.episodes!.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
@@ -161,8 +156,7 @@ class _BangumiPageState extends CommonPageState<BangumiPage, BangumiController>
|
|||||||
width: Grid.smallCardWidth / 2,
|
width: Grid.smallCardWidth / 2,
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
left: StyleString.safeSpace,
|
left: StyleString.safeSpace,
|
||||||
right:
|
right: index == item.episodes!.length - 1
|
||||||
index == item.episodes!.length - 1
|
|
||||||
? StyleString.safeSpace
|
? StyleString.safeSpace
|
||||||
: 0,
|
: 0,
|
||||||
),
|
),
|
||||||
@@ -174,7 +168,6 @@ class _BangumiPageState extends CommonPageState<BangumiPage, BangumiController>
|
|||||||
);
|
);
|
||||||
}).toList()),
|
}).toList()),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -347,17 +340,13 @@ class _BangumiPageState extends CommonPageState<BangumiPage, BangumiController>
|
|||||||
? Column(
|
? Column(
|
||||||
children: [
|
children: [
|
||||||
_buildFollowTitle(theme),
|
_buildFollowTitle(theme),
|
||||||
MediaQuery.removePadding(
|
SizedBox(
|
||||||
context: context,
|
|
||||||
removeLeft: context.orientation == Orientation.landscape,
|
|
||||||
child: SizedBox(
|
|
||||||
height: Grid.smallCardWidth / 2 / 0.75 +
|
height: Grid.smallCardWidth / 2 / 0.75 +
|
||||||
MediaQuery.textScalerOf(context).scale(50),
|
MediaQuery.textScalerOf(context).scale(50),
|
||||||
child: Obx(
|
child: Obx(
|
||||||
() => _buildFollowBody(controller.followState.value),
|
() => _buildFollowBody(controller.followState.value),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
: const SizedBox.shrink(),
|
: const SizedBox.shrink(),
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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(
|
||||||
|
page: () => FollowSearchPage(
|
||||||
mid: mid,
|
mid: mid,
|
||||||
isFromSelect: widget.isFromSelect,
|
isFromSelect: widget.isFromSelect,
|
||||||
),
|
),
|
||||||
useSafeArea: false,
|
),
|
||||||
transitionDuration: const Duration(milliseconds: 120),
|
|
||||||
);
|
);
|
||||||
if (userModel != null) {
|
if (userModel != null) {
|
||||||
Get.back(result: userModel);
|
Get.back(result: userModel);
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -31,9 +31,7 @@ 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),
|
|
||||||
body: Column(
|
|
||||||
children: [
|
children: [
|
||||||
if (!_homeController.useSideBar &&
|
if (!_homeController.useSideBar &&
|
||||||
context.orientation == Orientation.portrait)
|
context.orientation == Orientation.portrait)
|
||||||
@@ -46,9 +44,7 @@ class _HomePageState extends State<HomePage>
|
|||||||
padding: const EdgeInsets.only(top: 4),
|
padding: const EdgeInsets.only(top: 4),
|
||||||
child: TabBar(
|
child: TabBar(
|
||||||
controller: _homeController.tabController,
|
controller: _homeController.tabController,
|
||||||
tabs: [
|
tabs: [for (var i in _homeController.tabs) Tab(text: i.label)],
|
||||||
for (var i in _homeController.tabs) Tab(text: i.label)
|
|
||||||
],
|
|
||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
dividerColor: Colors.transparent,
|
dividerColor: Colors.transparent,
|
||||||
dividerHeight: 0,
|
dividerHeight: 0,
|
||||||
@@ -73,7 +69,6 @@ class _HomePageState extends State<HomePage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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,10 +273,7 @@ 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,
|
|
||||||
removeLeft: context.orientation == Orientation.landscape,
|
|
||||||
child: SelfSizedHorizontalList(
|
|
||||||
gapSize: 5,
|
gapSize: 5,
|
||||||
childBuilder: (index) {
|
childBuilder: (index) {
|
||||||
final item = followList[index];
|
final item = followList[index];
|
||||||
@@ -326,7 +321,6 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
itemCount: followList.length,
|
itemCount: followList.length,
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,7 +203,11 @@ class _MainAppState extends State<MainApp>
|
|||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
extendBody: true,
|
extendBody: true,
|
||||||
body: Row(
|
resizeToAvoidBottomInset: false,
|
||||||
|
appBar: AppBar(toolbarHeight: 0),
|
||||||
|
body: SafeArea(
|
||||||
|
bottom: false,
|
||||||
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
if (useSideBar || !isPortrait) ...[
|
if (useSideBar || !isPortrait) ...[
|
||||||
@@ -211,18 +215,13 @@ class _MainAppState extends State<MainApp>
|
|||||||
? context.isTablet && GStorage.optTabletNav
|
? context.isTablet && GStorage.optTabletNav
|
||||||
? Column(
|
? Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
const SizedBox(height: 25),
|
||||||
height:
|
|
||||||
MediaQuery.paddingOf(context).top + 50),
|
|
||||||
userAndSearchVertical(theme),
|
userAndSearchVertical(theme),
|
||||||
const Spacer(flex: 2),
|
const Spacer(flex: 2),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 5,
|
flex: 5,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 130,
|
width: 130,
|
||||||
child: MediaQuery.removePadding(
|
|
||||||
context: context,
|
|
||||||
removeRight: true,
|
|
||||||
child: Obx(
|
child: Obx(
|
||||||
() => NavigationDrawer(
|
() => NavigationDrawer(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
@@ -253,7 +252,6 @@ class _MainAppState extends State<MainApp>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
: Obx(
|
: Obx(
|
||||||
@@ -276,26 +274,18 @@ class _MainAppState extends State<MainApp>
|
|||||||
.toList(),
|
.toList(),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: SafeArea(
|
: Container(
|
||||||
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,
|
||||||
indent: MediaQuery.of(context).padding.top,
|
endIndent: MediaQuery.paddingOf(context).bottom,
|
||||||
endIndent: MediaQuery.of(context).padding.bottom,
|
|
||||||
color: theme.colorScheme.outline.withValues(alpha: 0.06),
|
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,9 +304,9 @@ class _MainAppState extends State<MainApp>
|
|||||||
.toList(),
|
.toList(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
bottomNavigationBar: useSideBar || !isPortrait
|
bottomNavigationBar: useSideBar || !isPortrait
|
||||||
? null
|
? null
|
||||||
: StreamBuilder(
|
: StreamBuilder(
|
||||||
|
|||||||
@@ -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: [
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user