mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-18 16:16:14 +08:00
opt reply item
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -13,7 +13,7 @@ class CustomToast extends StatelessWidget {
|
|||||||
.get(SettingBoxKey.defaultToastOp, defaultValue: 1.0) as double;
|
.get(SettingBoxKey.defaultToastOp, defaultValue: 1.0) as double;
|
||||||
return Container(
|
return Container(
|
||||||
margin:
|
margin:
|
||||||
EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom + 30),
|
EdgeInsets.only(bottom: MediaQuery.paddingOf(context).bottom + 30),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 17, vertical: 10),
|
padding: const EdgeInsets.symmetric(horizontal: 17, vertical: 10),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color:
|
color:
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ class _DynamicSliverAppBarMediumState extends State<DynamicSliverAppBarMedium> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final orientation = MediaQuery.of(context).orientation;
|
final orientation = MediaQuery.orientationOf(context);
|
||||||
if (orientation != _orientation) {
|
if (orientation != _orientation) {
|
||||||
_orientation = orientation;
|
_orientation = orientation;
|
||||||
_height = 0;
|
_height = 0;
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ class _NineGridViewState extends State<NineGridView> {
|
|||||||
return Rect.fromLTRB(0, 0, padding.horizontal, padding.vertical);
|
return Rect.fromLTRB(0, 0, padding.horizontal, padding.vertical);
|
||||||
}
|
}
|
||||||
double width = widget.width ??
|
double width = widget.width ??
|
||||||
(MediaQuery.of(context).size.width - widget.margin.horizontal);
|
(MediaQuery.sizeOf(context).width - widget.margin.horizontal);
|
||||||
width = width - padding.horizontal;
|
width = width - padding.horizontal;
|
||||||
double space = widget.space;
|
double space = widget.space;
|
||||||
double itemW;
|
double itemW;
|
||||||
@@ -389,11 +389,11 @@ class _NineGridViewState extends State<NineGridView> {
|
|||||||
/// get big image size.
|
/// get big image size.
|
||||||
Rect _getBigImgSize(double originalWidth, double originalHeight) {
|
Rect _getBigImgSize(double originalWidth, double originalHeight) {
|
||||||
double width = widget.width ??
|
double width = widget.width ??
|
||||||
(MediaQuery.of(context).size.width - widget.margin.horizontal);
|
(MediaQuery.sizeOf(context).width - widget.margin.horizontal);
|
||||||
width = width - widget.padding.horizontal;
|
width = width - widget.padding.horizontal;
|
||||||
double itemW = (width - widget.space * 2) / 3;
|
double itemW = (width - widget.space * 2) / 3;
|
||||||
|
|
||||||
//double devicePixelRatio = MediaQuery.of(context)?.devicePixelRatio ?? 3;
|
// double devicePixelRatio = MediaQuery.devicePixelRatioOf(context);
|
||||||
double devicePixelRatio = 1.0;
|
double devicePixelRatio = 1.0;
|
||||||
double tempWidth = originalWidth / devicePixelRatio;
|
double tempWidth = originalWidth / devicePixelRatio;
|
||||||
double tempHeight = originalHeight / devicePixelRatio;
|
double tempHeight = originalHeight / devicePixelRatio;
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ class _InteractiveviewerGalleryState extends State<InteractiveviewerGallery>
|
|||||||
children: [
|
children: [
|
||||||
InteractiveViewerBoundary(
|
InteractiveViewerBoundary(
|
||||||
controller: _transformationController,
|
controller: _transformationController,
|
||||||
boundaryWidth: MediaQuery.of(context).size.width,
|
boundaryWidth: MediaQuery.sizeOf(context).width,
|
||||||
onScaleChanged: _onScaleChanged,
|
onScaleChanged: _onScaleChanged,
|
||||||
onLeftBoundaryHit: _onLeftBoundaryHit,
|
onLeftBoundaryHit: _onLeftBoundaryHit,
|
||||||
onRightBoundaryHit: _onRightBoundaryHit,
|
onRightBoundaryHit: _onRightBoundaryHit,
|
||||||
|
|||||||
@@ -595,7 +595,7 @@ class _ArticlePageState extends State<ArticlePage>
|
|||||||
return Container(
|
return Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
bottom: MediaQuery.of(context).padding.bottom),
|
bottom: MediaQuery.paddingOf(context).bottom),
|
||||||
height: 125,
|
height: 125,
|
||||||
child: Text(
|
child: Text(
|
||||||
_articleCtr.isEnd ? '没有更多了' : '加载中...',
|
_articleCtr.isEnd ? '没有更多了' : '加载中...',
|
||||||
@@ -608,7 +608,7 @@ class _ArticlePageState extends State<ArticlePage>
|
|||||||
} else {
|
} else {
|
||||||
return ReplyItemGrpc(
|
return ReplyItemGrpc(
|
||||||
replyItem: response[index],
|
replyItem: response[index],
|
||||||
replyLevel: '1',
|
replyLevel: 1,
|
||||||
replyReply: (replyItem, id) =>
|
replyReply: (replyItem, id) =>
|
||||||
replyReply(context, replyItem, id),
|
replyReply(context, replyItem, id),
|
||||||
onReply: () => _articleCtr.onReply(
|
onReply: () => _articleCtr.onReply(
|
||||||
@@ -827,7 +827,7 @@ class _ArticlePageState extends State<ArticlePage>
|
|||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
right: 14,
|
right: 14,
|
||||||
bottom: MediaQuery.of(context).padding.bottom + 14,
|
bottom: MediaQuery.paddingOf(context).bottom + 14,
|
||||||
),
|
),
|
||||||
child: button(),
|
child: button(),
|
||||||
),
|
),
|
||||||
@@ -872,7 +872,7 @@ class _ArticlePageState extends State<ArticlePage>
|
|||||||
bottom: 14 +
|
bottom: 14 +
|
||||||
(_articleCtr.stats.value != null
|
(_articleCtr.stats.value != null
|
||||||
? 0
|
? 0
|
||||||
: MediaQuery.of(context).padding.bottom),
|
: MediaQuery.paddingOf(context).bottom),
|
||||||
),
|
),
|
||||||
child: button(),
|
child: button(),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ abstract class CommonSearchPageState<S extends CommonSearchPage, R, T>
|
|||||||
slivers: [
|
slivers: [
|
||||||
SliverPadding(
|
SliverPadding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
bottom: MediaQuery.of(context).padding.bottom + 80,
|
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||||
),
|
),
|
||||||
sliver: Obx(() => _buildBody(controller.loadingState.value)),
|
sliver: Obx(() => _buildBody(controller.loadingState.value)),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ class AuthorPanel extends StatelessWidget {
|
|||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
return Padding(
|
return Padding(
|
||||||
padding:
|
padding:
|
||||||
EdgeInsets.only(bottom: MediaQuery.of(context1).padding.bottom),
|
EdgeInsets.only(bottom: MediaQuery.paddingOf(context1).bottom),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -709,7 +709,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
|
|||||||
return Container(
|
return Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
bottom: MediaQuery.of(context).padding.bottom),
|
bottom: MediaQuery.paddingOf(context).bottom),
|
||||||
height: 125,
|
height: 125,
|
||||||
child: Text(
|
child: Text(
|
||||||
_controller.isEnd ? '没有更多了' : '加载中...',
|
_controller.isEnd ? '没有更多了' : '加载中...',
|
||||||
@@ -722,7 +722,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
|
|||||||
} else {
|
} else {
|
||||||
return ReplyItemGrpc(
|
return ReplyItemGrpc(
|
||||||
replyItem: response[index],
|
replyItem: response[index],
|
||||||
replyLevel: '1',
|
replyLevel: 1,
|
||||||
replyReply: (replyItem, id) =>
|
replyReply: (replyItem, id) =>
|
||||||
replyReply(context, replyItem, id),
|
replyReply(context, replyItem, id),
|
||||||
onReply: () => _controller.onReply(
|
onReply: () => _controller.onReply(
|
||||||
|
|||||||
@@ -355,7 +355,7 @@ class _RepostPanelState extends CommonPublishPageState<RepostPanel> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10 + MediaQuery.of(context).padding.bottom),
|
SizedBox(height: 10 + MediaQuery.paddingOf(context).bottom),
|
||||||
];
|
];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class _EmotePanelState extends State<EmotePanel>
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: MediaQuery.of(context).padding.bottom),
|
SizedBox(height: MediaQuery.paddingOf(context).bottom),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
: _errorWidget(),
|
: _errorWidget(),
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ class _EpisodePanelState extends CommonSlidePageState<EpisodePanel> {
|
|||||||
builder: (context) => ScrollablePositionedList.separated(
|
builder: (context) => ScrollablePositionedList.separated(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: 7,
|
top: 7,
|
||||||
bottom: MediaQuery.of(context).padding.bottom + 80,
|
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||||
),
|
),
|
||||||
reverse: _isReversed[tabIndex],
|
reverse: _isReversed[tabIndex],
|
||||||
itemCount: episodes.length,
|
itemCount: episodes.length,
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
_buildHeader(theme),
|
_buildHeader(theme),
|
||||||
SliverPadding(
|
SliverPadding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
bottom: MediaQuery.of(context).padding.bottom + 85,
|
bottom: MediaQuery.paddingOf(context).bottom + 85,
|
||||||
),
|
),
|
||||||
sliver: Obx(() => _buildBody(
|
sliver: Obx(() => _buildBody(
|
||||||
theme, _favDetailController.loadingState.value)),
|
theme, _favDetailController.loadingState.value)),
|
||||||
@@ -306,7 +306,7 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
return FlexibleSpaceBar(
|
return FlexibleSpaceBar(
|
||||||
background: Padding(
|
background: Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: kToolbarHeight + MediaQuery.of(context).padding.top + 10,
|
top: kToolbarHeight + MediaQuery.paddingOf(context).top + 10,
|
||||||
left: 14,
|
left: 14,
|
||||||
right: 20,
|
right: 20,
|
||||||
bottom: 10,
|
bottom: 10,
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ class _FavFolderSortPageState extends State<FavFolderSortPage> {
|
|||||||
onReorder: onReorder,
|
onReorder: onReorder,
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
footer: SizedBox(
|
footer: SizedBox(
|
||||||
height: MediaQuery.of(context).padding.bottom + 80,
|
height: MediaQuery.paddingOf(context).bottom + 80,
|
||||||
),
|
),
|
||||||
itemCount: sortList.length,
|
itemCount: sortList.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ class _FavPanelState extends State<FavPanel> {
|
|||||||
left: 20,
|
left: 20,
|
||||||
right: 20,
|
right: 20,
|
||||||
top: 12,
|
top: 12,
|
||||||
bottom: MediaQuery.of(context).padding.bottom + 12,
|
bottom: MediaQuery.paddingOf(context).bottom + 12,
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ class _FavSortPageState extends State<FavSortPage> {
|
|||||||
onReorder: onReorder,
|
onReorder: onReorder,
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
footer: SizedBox(
|
footer: SizedBox(
|
||||||
height: MediaQuery.of(context).padding.bottom + 80,
|
height: MediaQuery.paddingOf(context).bottom + 80,
|
||||||
),
|
),
|
||||||
itemCount: sortList.length,
|
itemCount: sortList.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ class _GroupPanelState extends State<GroupPanel> {
|
|||||||
left: 20,
|
left: 20,
|
||||||
right: 20,
|
right: 20,
|
||||||
top: 12,
|
top: 12,
|
||||||
bottom: MediaQuery.of(context).padding.bottom + 12,
|
bottom: MediaQuery.paddingOf(context).bottom + 12,
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ class _HistoryPageState extends State<HistoryPage>
|
|||||||
SliverPadding(
|
SliverPadding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: StyleString.safeSpace - 5,
|
top: StyleString.safeSpace - 5,
|
||||||
bottom: MediaQuery.of(context).padding.bottom + 80,
|
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||||
),
|
),
|
||||||
sliver:
|
sliver:
|
||||||
Obx(() => _buildBody(_historyController.loadingState.value)),
|
Obx(() => _buildBody(_historyController.loadingState.value)),
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ class _HotPageState extends CommonPageState<HotPage, HotController>
|
|||||||
SliverPadding(
|
SliverPadding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: StyleString.safeSpace - 5,
|
top: StyleString.safeSpace - 5,
|
||||||
bottom: MediaQuery.of(context).padding.bottom + 80,
|
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||||
),
|
),
|
||||||
sliver: Obx(
|
sliver: Obx(
|
||||||
() => _buildBody(controller.loadingState.value),
|
() => _buildBody(controller.loadingState.value),
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class _LaterViewChildPageState extends State<LaterViewChildPage>
|
|||||||
SliverPadding(
|
SliverPadding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: 7,
|
top: 7,
|
||||||
bottom: MediaQuery.of(context).padding.bottom + 85,
|
bottom: MediaQuery.paddingOf(context).bottom + 85,
|
||||||
),
|
),
|
||||||
sliver: Obx(
|
sliver: Obx(
|
||||||
() => _buildBody(_laterController.loadingState.value),
|
() => _buildBody(_laterController.loadingState.value),
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class _LiveEmotePanelState extends State<LiveEmotePanel>
|
|||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
),
|
),
|
||||||
SizedBox(height: MediaQuery.of(context).padding.bottom),
|
SizedBox(height: MediaQuery.paddingOf(context).bottom),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
: _errorWidget(),
|
: _errorWidget(),
|
||||||
|
|||||||
@@ -538,7 +538,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
|||||||
left: 10,
|
left: 10,
|
||||||
top: 10,
|
top: 10,
|
||||||
right: 10,
|
right: 10,
|
||||||
bottom: 25 + MediaQuery.of(context).padding.bottom,
|
bottom: 25 + MediaQuery.paddingOf(context).bottom,
|
||||||
),
|
),
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ class UserInfoCard extends StatelessWidget {
|
|||||||
}) {
|
}) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class _MemberDynamicsPageState extends State<MemberDynamicsPage>
|
|||||||
super.build(context);
|
super.build(context);
|
||||||
return widget.mid == null
|
return widget.mid == null
|
||||||
? Scaffold(
|
? Scaffold(
|
||||||
appBar: AppBar(title: const Text('Ta的动态')),
|
appBar: AppBar(title: const Text('我的动态')),
|
||||||
body: _buildBody,
|
body: _buildBody,
|
||||||
)
|
)
|
||||||
: _buildBody;
|
: _buildBody;
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ class _MemberHomeState extends State<MemberHome>
|
|||||||
],
|
],
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 80 + MediaQuery.of(context).padding.bottom,
|
height: 80 + MediaQuery.paddingOf(context).bottom,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class _MemberBangumiState extends State<MemberBangumi>
|
|||||||
right: StyleString.safeSpace,
|
right: StyleString.safeSpace,
|
||||||
top: StyleString.safeSpace,
|
top: StyleString.safeSpace,
|
||||||
bottom: StyleString.safeSpace +
|
bottom: StyleString.safeSpace +
|
||||||
MediaQuery.of(context).padding.bottom +
|
MediaQuery.paddingOf(context).bottom +
|
||||||
80,
|
80,
|
||||||
),
|
),
|
||||||
sliver: Obx(
|
sliver: Obx(
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class _MemberVideoState extends State<MemberVideo>
|
|||||||
slivers: [
|
slivers: [
|
||||||
SliverPadding(
|
SliverPadding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
bottom: MediaQuery.of(context).padding.bottom + 80,
|
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||||
),
|
),
|
||||||
sliver: Obx(
|
sliver: Obx(
|
||||||
() => _buildBody(theme, _controller.loadingState.value)),
|
() => _buildBody(theme, _controller.loadingState.value)),
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class _ZonePageState extends CommonPageState<ZonePage, ZoneController>
|
|||||||
SliverPadding(
|
SliverPadding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: StyleString.safeSpace - 5,
|
top: StyleString.safeSpace - 5,
|
||||||
bottom: MediaQuery.of(context).padding.bottom + 80,
|
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||||
),
|
),
|
||||||
sliver: Obx(() => _buildBody(controller.loadingState.value)),
|
sliver: Obx(() => _buildBody(controller.loadingState.value)),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ class _SavePanelState extends State<SavePanel> {
|
|||||||
IgnorePointer(
|
IgnorePointer(
|
||||||
child: ReplyItemGrpc(
|
child: ReplyItemGrpc(
|
||||||
replyItem: _item,
|
replyItem: _item,
|
||||||
replyLevel: '',
|
replyLevel: 0,
|
||||||
needDivider: false,
|
needDivider: false,
|
||||||
upMid: widget.upMid,
|
upMid: widget.upMid,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class SearchArticleController
|
|||||||
top: 20,
|
top: 20,
|
||||||
left: 16,
|
left: 16,
|
||||||
right: 16,
|
right: 16,
|
||||||
bottom: 80 + MediaQuery.of(context).padding.bottom,
|
bottom: 80 + MediaQuery.paddingOf(context).bottom,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class SearchUserController
|
|||||||
top: 20,
|
top: 20,
|
||||||
left: 16,
|
left: 16,
|
||||||
right: 16,
|
right: 16,
|
||||||
bottom: 80 + MediaQuery.of(context).padding.bottom,
|
bottom: 80 + MediaQuery.paddingOf(context).bottom,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ class SearchVideoController
|
|||||||
top: 20,
|
top: 20,
|
||||||
left: 16,
|
left: 16,
|
||||||
right: 16,
|
right: 16,
|
||||||
bottom: 80 + MediaQuery.of(context).padding.bottom,
|
bottom: 80 + MediaQuery.paddingOf(context).bottom,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class _BarSetPageState extends State<BarSetPage> {
|
|||||||
body: ReorderableListView(
|
body: ReorderableListView(
|
||||||
onReorder: onReorder,
|
onReorder: onReorder,
|
||||||
footer: SizedBox(
|
footer: SizedBox(
|
||||||
height: MediaQuery.of(context).padding.bottom + 30,
|
height: MediaQuery.paddingOf(context).bottom + 30,
|
||||||
child: const Align(
|
child: const Align(
|
||||||
alignment: Alignment.centerRight, child: Text('*长按拖动排序 ')),
|
alignment: Alignment.centerRight, child: Text('*长按拖动排序 ')),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ List<SettingsModel> get styleSettings => [
|
|||||||
leading: const Icon(Icons.calendar_view_week_outlined),
|
leading: const Icon(Icons.calendar_view_week_outlined),
|
||||||
title: '列表宽度(dp)限制',
|
title: '列表宽度(dp)限制',
|
||||||
getSubtitle: () =>
|
getSubtitle: () =>
|
||||||
'当前:${GStorage.smallCardWidth.toInt()}dp,屏幕宽度:${MediaQuery.of(Get.context!).size.width.toPrecision(2)}dp。宽度越小列数越多。',
|
'当前:${GStorage.smallCardWidth.toInt()}dp,屏幕宽度:${Get.mediaQuery.size.width.toPrecision(2)}dp。宽度越小列数越多。',
|
||||||
),
|
),
|
||||||
SettingsModel(
|
SettingsModel(
|
||||||
settingsType: SettingsType.sw1tch,
|
settingsType: SettingsType.sw1tch,
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class _SubPageState extends State<SubPage> {
|
|||||||
Obx(() => _buildBody(_subController.loadingState.value)),
|
Obx(() => _buildBody(_subController.loadingState.value)),
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: MediaQuery.of(context).padding.bottom + 80,
|
height: MediaQuery.paddingOf(context).bottom + 80,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ class _SubDetailPageState extends State<SubDetailPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: kToolbarHeight + MediaQuery.of(context).padding.top + 10,
|
top: kToolbarHeight + MediaQuery.paddingOf(context).top + 10,
|
||||||
left: 12,
|
left: 12,
|
||||||
right: 12,
|
right: 12,
|
||||||
bottom: 12,
|
bottom: 12,
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class _PgcIntroPageState extends State<PgcIntroPage>
|
|||||||
final ThemeData theme = Theme.of(context);
|
final ThemeData theme = Theme.of(context);
|
||||||
final item = pgcIntroController.pgcItem;
|
final item = pgcIntroController.pgcItem;
|
||||||
final isLandscape =
|
final isLandscape =
|
||||||
MediaQuery.of(context).orientation == Orientation.landscape;
|
MediaQuery.orientationOf(context) == Orientation.landscape;
|
||||||
return SliverPadding(
|
return SliverPadding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
left: StyleString.safeSpace,
|
left: StyleString.safeSpace,
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ class _HorizontalMemberPageState extends State<HorizontalMemberPage> {
|
|||||||
Success(:var response) => response?.isNotEmpty == true
|
Success(:var response) => response?.isNotEmpty == true
|
||||||
? SliverPadding(
|
? SliverPadding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
bottom: MediaQuery.of(context).padding.bottom + 80,
|
bottom: MediaQuery.paddingOf(context).bottom + 80,
|
||||||
),
|
),
|
||||||
sliver: SliverGrid(
|
sliver: SliverGrid(
|
||||||
gridDelegate: Grid.videoCardHDelegate(context),
|
gridDelegate: Grid.videoCardHDelegate(context),
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ class _PayCoinsPageState extends State<PayCoinsPage>
|
|||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: (isV ? 50 : 10) +
|
height: (isV ? 50 : 10) +
|
||||||
MediaQuery.of(context).padding.bottom),
|
MediaQuery.paddingOf(context).bottom),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class VideoReplyPanel extends StatefulWidget {
|
|||||||
final String? bvid;
|
final String? bvid;
|
||||||
final int oid;
|
final int oid;
|
||||||
final int rpid;
|
final int rpid;
|
||||||
final String replyLevel;
|
final int replyLevel;
|
||||||
final String heroTag;
|
final String heroTag;
|
||||||
final Function(ReplyInfo replyItem, int? rpid) replyReply;
|
final Function(ReplyInfo replyItem, int? rpid) replyReply;
|
||||||
final VoidCallback? onViewImage;
|
final VoidCallback? onViewImage;
|
||||||
@@ -30,7 +30,7 @@ class VideoReplyPanel extends StatefulWidget {
|
|||||||
this.bvid,
|
this.bvid,
|
||||||
required this.oid,
|
required this.oid,
|
||||||
this.rpid = 0,
|
this.rpid = 0,
|
||||||
this.replyLevel = '1',
|
this.replyLevel = 1,
|
||||||
required this.heroTag,
|
required this.heroTag,
|
||||||
required this.replyReply,
|
required this.replyReply,
|
||||||
this.onViewImage,
|
this.onViewImage,
|
||||||
@@ -163,7 +163,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: MediaQuery.of(context).padding.bottom + 14,
|
bottom: MediaQuery.paddingOf(context).bottom + 14,
|
||||||
right: 14,
|
right: 14,
|
||||||
child: SlideTransition(
|
child: SlideTransition(
|
||||||
position: _videoReplyController.anim,
|
position: _videoReplyController.anim,
|
||||||
@@ -198,7 +198,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
|||||||
Success(:var response) => response?.isNotEmpty == true
|
Success(:var response) => response?.isNotEmpty == true
|
||||||
? SliverList.builder(
|
? SliverList.builder(
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
double bottom = MediaQuery.of(context).padding.bottom;
|
double bottom = MediaQuery.paddingOf(context).bottom;
|
||||||
if (index == response.length) {
|
if (index == response.length) {
|
||||||
_videoReplyController.onLoadMore();
|
_videoReplyController.onLoadMore();
|
||||||
return Container(
|
return Container(
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
this.onToggleTop,
|
this.onToggleTop,
|
||||||
});
|
});
|
||||||
final ReplyInfo replyItem;
|
final ReplyInfo replyItem;
|
||||||
final String replyLevel;
|
final int replyLevel;
|
||||||
final Function(ReplyInfo replyItem, int? rpid)? replyReply;
|
final Function(ReplyInfo replyItem, int? rpid)? replyReply;
|
||||||
final bool needDivider;
|
final bool needDivider;
|
||||||
final VoidCallback? onReply;
|
final VoidCallback? onReply;
|
||||||
@@ -230,7 +230,7 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(
|
Text(
|
||||||
replyLevel == ''
|
replyLevel == 0
|
||||||
? DateTime.fromMillisecondsSinceEpoch(
|
? DateTime.fromMillisecondsSinceEpoch(
|
||||||
replyItem.ctime.toInt() * 1000)
|
replyItem.ctime.toInt() * 1000)
|
||||||
.toString()
|
.toString()
|
||||||
@@ -259,7 +259,7 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
top: 10,
|
top: 10,
|
||||||
left: replyLevel == '' ? 6 : 45,
|
left: replyLevel == 0 ? 6 : 45,
|
||||||
right: 6,
|
right: 6,
|
||||||
bottom: 4,
|
bottom: 4,
|
||||||
),
|
),
|
||||||
@@ -272,7 +272,7 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
TextPainter? textPainter;
|
TextPainter? textPainter;
|
||||||
bool? didExceedMaxLines;
|
bool? didExceedMaxLines;
|
||||||
if (replyLevel == '1' && GlobalData().replyLengthLimit != 0) {
|
if (replyLevel == 1 && GlobalData().replyLengthLimit != 0) {
|
||||||
textPainter = TextPainter(
|
textPainter = TextPainter(
|
||||||
text: TextSpan(text: text, style: style),
|
text: TextSpan(text: text, style: style),
|
||||||
maxLines: GlobalData().replyLengthLimit,
|
maxLines: GlobalData().replyLengthLimit,
|
||||||
@@ -316,12 +316,10 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
// 操作区域
|
// 操作区域
|
||||||
if (replyLevel != '')
|
if (replyLevel != 0)
|
||||||
buttonAction(context, theme, replyItem.replyControl),
|
buttonAction(context, theme, replyItem.replyControl),
|
||||||
// 一楼的评论
|
// 一楼的评论
|
||||||
if (replyLevel == '1' &&
|
if (replyLevel == 1 && replyItem.replies.isNotEmpty) ...[
|
||||||
(replyItem.replies.isNotEmpty ||
|
|
||||||
replyItem.replyControl.subReplyEntryText.isNotEmpty)) ...[
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 5, bottom: 12),
|
padding: const EdgeInsets.only(top: 5, bottom: 12),
|
||||||
child: replyItemRow(context, theme),
|
child: replyItemRow(context, theme),
|
||||||
@@ -397,9 +395,7 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
color: theme.colorScheme.secondary,
|
color: theme.colorScheme.secondary,
|
||||||
fontSize: theme.textTheme.labelMedium!.fontSize),
|
fontSize: theme.textTheme.labelMedium!.fontSize),
|
||||||
),
|
),
|
||||||
if (replyLevel == '2' &&
|
if (replyLevel == 2 && needDivider && replyItem.id != replyItem.dialog)
|
||||||
needDivider &&
|
|
||||||
replyItem.id != replyItem.dialog)
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 32,
|
height: 32,
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
@@ -424,8 +420,8 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
|
|
||||||
Widget replyItemRow(BuildContext context, ThemeData theme) {
|
Widget replyItemRow(BuildContext context, ThemeData theme) {
|
||||||
final bool extraRow = replyItem.replies.length < replyItem.count.toInt();
|
final bool extraRow = replyItem.replies.length < replyItem.count.toInt();
|
||||||
return Container(
|
return Padding(
|
||||||
margin: const EdgeInsets.only(left: 42, right: 4, top: 0),
|
padding: const EdgeInsets.only(left: 42, right: 4),
|
||||||
child: Material(
|
child: Material(
|
||||||
color: theme.colorScheme.onInverseSurface,
|
color: theme.colorScheme.onInverseSurface,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
||||||
@@ -1132,7 +1128,7 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
leading: Icon(Icons.error_outline, color: errorColor, size: 19),
|
leading: Icon(Icons.error_outline, color: errorColor, size: 19),
|
||||||
title: Text('举报', style: style!.copyWith(color: errorColor)),
|
title: Text('举报', style: style!.copyWith(color: errorColor)),
|
||||||
),
|
),
|
||||||
if (replyLevel == '1' && !isSubReply && ownerMid == upMid)
|
if (replyLevel == 1 && !isSubReply && ownerMid == upMid)
|
||||||
ListTile(
|
ListTile(
|
||||||
onTap: () => menuActionHandler('top'),
|
onTap: () => menuActionHandler('top'),
|
||||||
minLeadingWidth: 0,
|
minLeadingWidth: 0,
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ class _VideoReplyReplyPanelState
|
|||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
return ReplyItemGrpc(
|
return ReplyItemGrpc(
|
||||||
replyItem: firstFloor!,
|
replyItem: firstFloor!,
|
||||||
replyLevel: '2',
|
replyLevel: 2,
|
||||||
needDivider: false,
|
needDivider: false,
|
||||||
onReply: () => _onReply(firstFloor!, -1),
|
onReply: () => _onReply(firstFloor!, -1),
|
||||||
upMid: _videoReplyReplyController.upMid,
|
upMid: _videoReplyReplyController.upMid,
|
||||||
@@ -384,8 +384,8 @@ class _VideoReplyReplyPanelState
|
|||||||
_videoReplyReplyController.onLoadMore();
|
_videoReplyReplyController.onLoadMore();
|
||||||
return Container(
|
return Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
margin: EdgeInsets.only(
|
margin:
|
||||||
bottom: MediaQuery.of(context).padding.bottom),
|
EdgeInsets.only(bottom: MediaQuery.paddingOf(context).bottom),
|
||||||
height: 125,
|
height: 125,
|
||||||
child: Text(
|
child: Text(
|
||||||
_videoReplyReplyController.isEnd ? '没有更多了' : '加载中...',
|
_videoReplyReplyController.isEnd ? '没有更多了' : '加载中...',
|
||||||
@@ -426,7 +426,7 @@ class _VideoReplyReplyPanelState
|
|||||||
Widget _replyItem(ReplyInfo replyItem, int index) {
|
Widget _replyItem(ReplyInfo replyItem, int index) {
|
||||||
return ReplyItemGrpc(
|
return ReplyItemGrpc(
|
||||||
replyItem: replyItem,
|
replyItem: replyItem,
|
||||||
replyLevel: widget.isDialogue ? '3' : '2',
|
replyLevel: widget.isDialogue ? 3 : 2,
|
||||||
onReply: () => _onReply(replyItem, index),
|
onReply: () => _onReply(replyItem, index),
|
||||||
onDelete: (subIndex) {
|
onDelete: (subIndex) {
|
||||||
_videoReplyReplyController.onRemove(index, null);
|
_videoReplyReplyController.onRemove(index, null);
|
||||||
|
|||||||
@@ -624,7 +624,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
? height -
|
? height -
|
||||||
(!isPortrait || removeSafeArea
|
(!isPortrait || removeSafeArea
|
||||||
? 0
|
? 0
|
||||||
: MediaQuery.of(this.context).padding.top)
|
: MediaQuery.paddingOf(this.context).top)
|
||||||
: videoDetailController.isExpanding ||
|
: videoDetailController.isExpanding ||
|
||||||
videoDetailController.isCollapsing
|
videoDetailController.isCollapsing
|
||||||
? animHeight
|
? animHeight
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class ScrollAppBar extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final double statusBarHeight = MediaQuery.of(context).padding.top;
|
final double statusBarHeight = MediaQuery.paddingOf(context).top;
|
||||||
final videoHeight = MediaQuery.sizeOf(context).width * 9 / 16;
|
final videoHeight = MediaQuery.sizeOf(context).width * 9 / 16;
|
||||||
double scrollDistance = scrollVal;
|
double scrollDistance = scrollVal;
|
||||||
if (scrollVal > videoHeight - kToolbarHeight) {
|
if (scrollVal > videoHeight - kToolbarHeight) {
|
||||||
|
|||||||
@@ -1863,7 +1863,7 @@ class HeaderControlState extends State<HeaderControl> {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (isFullScreen) {
|
if (isFullScreen) {
|
||||||
widget.controller.triggerFullScreen(status: false);
|
widget.controller.triggerFullScreen(status: false);
|
||||||
} else if (MediaQuery.of(context).orientation ==
|
} else if (MediaQuery.orientationOf(context) ==
|
||||||
Orientation.landscape &&
|
Orientation.landscape &&
|
||||||
!horizontalScreen) {
|
!horizontalScreen) {
|
||||||
verticalScreenForTwoSeconds();
|
verticalScreenForTwoSeconds();
|
||||||
@@ -1874,7 +1874,7 @@ class HeaderControlState extends State<HeaderControl> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (!isFullScreen ||
|
if (!isFullScreen ||
|
||||||
MediaQuery.of(context).orientation != Orientation.portrait)
|
MediaQuery.orientationOf(context) != Orientation.portrait)
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 42,
|
width: 42,
|
||||||
height: 34,
|
height: 34,
|
||||||
@@ -1895,7 +1895,7 @@ class HeaderControlState extends State<HeaderControl> {
|
|||||||
(isFullScreen ||
|
(isFullScreen ||
|
||||||
(!isFullScreen &&
|
(!isFullScreen &&
|
||||||
!horizontalScreen &&
|
!horizontalScreen &&
|
||||||
MediaQuery.of(context).orientation ==
|
MediaQuery.orientationOf(context) ==
|
||||||
Orientation.landscape)))
|
Orientation.landscape)))
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -1996,7 +1996,7 @@ class HeaderControlState extends State<HeaderControl> {
|
|||||||
Obx(
|
Obx(
|
||||||
() {
|
() {
|
||||||
if ((isFullScreen || !horizontalScreen) &&
|
if ((isFullScreen || !horizontalScreen) &&
|
||||||
MediaQuery.of(context).orientation ==
|
MediaQuery.orientationOf(context) ==
|
||||||
Orientation.landscape) {
|
Orientation.landscape) {
|
||||||
startClock();
|
startClock();
|
||||||
return Text(
|
return Text(
|
||||||
|
|||||||
@@ -19,14 +19,14 @@ extension ImageExtension on num? {
|
|||||||
if (this == null || this == 0) {
|
if (this == null || this == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return (this! * MediaQuery.of(context).devicePixelRatio).round();
|
return (this! * MediaQuery.devicePixelRatioOf(context)).round();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ScrollControllerExt on ScrollController {
|
extension ScrollControllerExt on ScrollController {
|
||||||
void animToTop() {
|
void animToTop() {
|
||||||
if (!hasClients) return;
|
if (!hasClients) return;
|
||||||
if (offset >= MediaQuery.of(Get.context!).size.height * 7) {
|
if (offset >= Get.mediaQuery.size.height * 7) {
|
||||||
jumpTo(0);
|
jumpTo(0);
|
||||||
} else {
|
} else {
|
||||||
animateTo(0,
|
animateTo(0,
|
||||||
|
|||||||
Reference in New Issue
Block a user