mod: 详情页横屏布局(bug很多不要下载!)

This commit is contained in:
orz12
2024-02-08 23:29:42 +08:00
parent 88bc9e3ff9
commit 2ed7d00483
17 changed files with 294 additions and 102 deletions

View File

@@ -1,9 +1,7 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hive/hive.dart';
import 'package:pilipala/common/widgets/http_error.dart';
import 'package:pilipala/utils/feed_back.dart';
import 'package:pilipala/utils/storage.dart';
class FavPanel extends StatefulWidget {
const FavPanel({super.key, this.ctr});
@@ -14,21 +12,18 @@ class FavPanel extends StatefulWidget {
}
class _FavPanelState extends State<FavPanel> {
final Box<dynamic> localCache = GStrorage.localCache;
late double sheetHeight;
late Future _futureBuilderFuture;
@override
void initState() {
super.initState();
sheetHeight = localCache.get('sheetHeight');
_futureBuilderFuture = widget.ctr!.queryVideoInFolder();
}
@override
Widget build(BuildContext context) {
return Container(
height: sheetHeight,
height: context.height.abs() * 0.7,
color: Theme.of(context).colorScheme.background,
child: Column(
children: [

View File

@@ -1,12 +1,10 @@
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:hive/hive.dart';
import 'package:pilipala/common/widgets/http_error.dart';
import 'package:pilipala/http/member.dart';
import 'package:pilipala/models/member/tags.dart';
import 'package:pilipala/utils/feed_back.dart';
import 'package:pilipala/utils/storage.dart';
class GroupPanel extends StatefulWidget {
final int? mid;
@@ -17,8 +15,6 @@ class GroupPanel extends StatefulWidget {
}
class _GroupPanelState extends State<GroupPanel> {
final Box<dynamic> localCache = GStrorage.localCache;
late double sheetHeight;
late Future _futureBuilderFuture;
late List<MemberTagItemModel> tagsList;
bool showDefault = true;
@@ -26,7 +22,6 @@ class _GroupPanelState extends State<GroupPanel> {
@override
void initState() {
super.initState();
sheetHeight = localCache.get('sheetHeight');
_futureBuilderFuture = MemberHttp.followUpTags();
}
@@ -56,7 +51,7 @@ class _GroupPanelState extends State<GroupPanel> {
@override
Widget build(BuildContext context) {
return Container(
height: sheetHeight,
height: context.height.abs() * 0.7,
color: Theme.of(context).colorScheme.background,
child: Column(
children: <Widget>[

View File

@@ -2,15 +2,10 @@ import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:hive/hive.dart';
import 'package:pilipala/common/widgets/stat/danmu.dart';
import 'package:pilipala/common/widgets/stat/view.dart';
import 'package:pilipala/utils/storage.dart';
import 'package:pilipala/utils/utils.dart';
Box localCache = GStrorage.localCache;
late double sheetHeight;
class IntroDetail extends StatelessWidget {
const IntroDetail({
super.key,
@@ -20,11 +15,10 @@ class IntroDetail extends StatelessWidget {
@override
Widget build(BuildContext context) {
sheetHeight = localCache.get('sheetHeight');
return Container(
color: Theme.of(context).colorScheme.background,
padding: const EdgeInsets.only(left: 14, right: 14),
height: sheetHeight,
height: context.height.abs() * 0.7,
child: Column(
children: [
InkWell(

View File

@@ -8,12 +8,10 @@ class PagesPanel extends StatefulWidget {
super.key,
required this.pages,
this.cid,
this.sheetHeight,
this.changeFuc,
});
final List<Part> pages;
final int? cid;
final double? sheetHeight;
final Function? changeFuc;
@override
@@ -96,7 +94,7 @@ class _PagesPanelState extends State<PagesPanel> {
_scrollController.jumpTo(currentIndex * 56);
});
return Container(
height: widget.sheetHeight,
height: context.height.abs() * 0.7,
color: Theme.of(context).colorScheme.background,
child: Column(
children: [

View File

@@ -10,12 +10,10 @@ class SeasonPanel extends StatefulWidget {
super.key,
required this.ugcSeason,
this.cid,
this.sheetHeight,
this.changeFuc,
});
final UgcSeason ugcSeason;
final int? cid;
final double? sheetHeight;
final Function? changeFuc;
@override
@@ -104,7 +102,7 @@ class _SeasonPanelState extends State<SeasonPanel> {
itemScrollController.jumpTo(index: currentIndex);
});
return Container(
height: widget.sheetHeight,
height: context.height.abs() * 0.7,
color: Theme.of(context).colorScheme.background,
child: Column(
children: [