Skip to content

Commit

Permalink
chore: ui调整
Browse files Browse the repository at this point in the history
  • Loading branch information
lucinhu committed Apr 8, 2023
1 parent 5f1e85a commit 2cdd3d0
Show file tree
Hide file tree
Showing 34 changed files with 139 additions and 138 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Flutter action
uses: subosito/flutter-action@v2
with:
flutter-version: 3.9.0-20.0.pre.76
flutter-version: 3.9.0-22.0.pre.102
channel: master

- name: Decode keystore
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions lib/pages/bili_video/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ class _BiliVideoPageState extends State<BiliVideoPage> {

@override
void dispose() {
biliVideoController.onClose();
biliVideoController.onDelete();
// biliVideoController.onClose();
// biliVideoController.onDelete();
biliVideoController.dispose();
super.dispose();
}

Expand Down
5 changes: 3 additions & 2 deletions lib/pages/bili_video/widgets/introduction/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,9 @@ class _IntroductionPageState extends State<IntroductionPage>

@override
void dispose() {
controller.onClose();
controller.onDelete();
// controller.onClose();
// controller.onDelete();
controller.dispose();
super.dispose();
}

Expand Down
5 changes: 3 additions & 2 deletions lib/pages/home/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ class _HomePageState extends State<HomePage>

@override
void dispose() {
controller.onClose();
controller.onDelete();
// controller.onClose();
// controller.onDelete();
controller.dispose();
super.dispose();
}

Expand Down
8 changes: 6 additions & 2 deletions lib/pages/home/widgets/user_menu/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ class UserMenuPage extends GetView<UserMenuController> {
.listenable(keys: [UserStorageKeys.userFace]),
builder: (context, value, child) {
return CachedNetworkImage(
cacheWidth: 100,
cacheHeight: 100,
cacheWidth: (80 *
MediaQuery.of(context).devicePixelRatio)
.toInt(),
cacheHeight: (80 *
MediaQuery.of(context).devicePixelRatio)
.toInt(),
//头像
cacheManager: controller.cacheManager,
width: 80,
Expand Down
5 changes: 3 additions & 2 deletions lib/pages/main/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ class _MainPageState extends State<MainPage> {

@override
void dispose() {
controller.onClose();
controller.onDelete();
// controller.onClose();
// controller.onDelete();
controller.dispose();
super.dispose();
}

Expand Down
9 changes: 5 additions & 4 deletions lib/pages/recommend/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ class _RecommendPageState extends State<RecommendPage>

@override
void dispose() {
controller.onClose();
controller.onDelete();
// controller.onClose();
// controller.onDelete();
controller.dispose();
super.dispose();
}

// 主视图
Widget _buildView(BuildContext context) {
controller.updateWidget = () => setState(() {});
return EasyRefresh.builder(
refreshOnStart: true,
onLoad: () async {
Expand Down Expand Up @@ -75,8 +77,7 @@ class _RecommendPageState extends State<RecommendPage>
controller.recommendColumnCount) *
10 /
16 +
20 +
58),
83 * MediaQuery.of(context).textScaleFactor),
itemCount: controller.recommendViewList.length,
itemBuilder: (context, index) {
return controller.recommendViewList[index];
Expand Down
187 changes: 88 additions & 99 deletions lib/pages/recommend/widgets/recommend_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ class RecommendCard extends StatelessWidget {
final int cid;
final int heroTagId;

final playInfoTextStyle = const TextStyle(
color: Colors.white, fontSize: 10, overflow: TextOverflow.ellipsis);

void onTap(BuildContext context) {
// Get.to(
// () => BiliVideoPage(
Expand All @@ -61,6 +58,11 @@ class RecommendCard extends StatelessWidget {

@override
Widget build(BuildContext context) {
TextStyle playInfoTextStyle = TextStyle(
color: Theme.of(context).hintColor,
fontSize: 12,
overflow: TextOverflow.ellipsis);
Color iconColor = Theme.of(context).hintColor;
return Card(
margin: EdgeInsets.zero,
child: Stack(children: [
Expand All @@ -69,108 +71,95 @@ class RecommendCard extends StatelessWidget {
children: [
ClipRRect(
borderRadius: BorderRadius.circular(12),
child: Stack(
alignment: Alignment.bottomLeft,
child: AspectRatio(
aspectRatio: 16 / 10,
child: LayoutBuilder(builder: (context, boxConstraints) {
return Hero(
tag: heroTagId,
transitionOnUserGestures: true,
child: CachedNetworkImage(
cacheWidth: (boxConstraints.maxWidth *
MediaQuery.of(context).devicePixelRatio)
.toInt(),
cacheHeight: (boxConstraints.maxHeight *
MediaQuery.of(context).devicePixelRatio)
.toInt(),
cacheManager: cacheManager,
fit: BoxFit.cover,
imageUrl: imageUrl,
placeholder: () => Container(
color: Theme.of(context).colorScheme.surfaceVariant,
),
errorWidget: () => const Center(
child: Icon(Icons.error),
),
filterQuality: FilterQuality.none,
));
}),
),
),
Padding(
padding: const EdgeInsets.all(6.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AspectRatio(
aspectRatio: 16 / 10,
child: LayoutBuilder(builder: (context, boxConstraints) {
return Hero(
tag: heroTagId,
transitionOnUserGestures: true,
child: CachedNetworkImage(
cacheWidth: (boxConstraints.maxWidth *
MediaQuery.of(context).devicePixelRatio)
.toInt(),
cacheHeight: (boxConstraints.maxHeight *
MediaQuery.of(context).devicePixelRatio)
.toInt(),
cacheManager: cacheManager,
fit: BoxFit.cover,
imageUrl: imageUrl,
placeholder: () => Container(
color: Theme.of(context)
.colorScheme
.surfaceVariant,
),
errorWidget: () => const Center(
child: Icon(Icons.error),
),
filterQuality: FilterQuality.none,
));
}),
),
Container(
decoration: const BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.black38,
blurRadius: 12,
spreadRadius: 10,
offset: Offset(0, 12)),
],
SizedBox(
height: 40 * MediaQuery.of(context).textScaleFactor,
child: Text(
title,
maxLines: 2,
style: const TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
padding:
const EdgeInsets.only(left: 6, right: 6, bottom: 3),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(
),
Text.rich(
TextSpan(children: [
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: Icon(
Icons.slideshow_rounded,
color: Colors.white,
size: 11,
),
Text(
" $playNum ",
maxLines: 1,
style: playInfoTextStyle,
),
const Icon(
Icons.format_list_bulleted_rounded,
color: Colors.white,
size: 11,
),
Text(
" $danmakuNum",
maxLines: 1,
style: playInfoTextStyle,
),
const Spacer(),
Text(
timeLength,
maxLines: 1,
style: playInfoTextStyle,
),
]),
color: iconColor,
size: 12 * MediaQuery.of(context).textScaleFactor,
)),
TextSpan(
text: " $playNum ",
),
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: Icon(
Icons.format_list_bulleted_rounded,
color: iconColor,
size: 12 * MediaQuery.of(context).textScaleFactor,
),
),
TextSpan(
text: " $danmakuNum ",
),
WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: Icon(
Icons.timer_outlined,
color: iconColor,
size: 12 * MediaQuery.of(context).textScaleFactor,
),
),
TextSpan(
text: ' $timeLength',
),
]),
style: playInfoTextStyle,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
Text(
upName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: playInfoTextStyle,
)
],
),
),
SizedBox(
height: 52,
child: Padding(
padding: const EdgeInsets.only(
top: 8, left: 5, right: 5, bottom: 2),
child: Text(
title,
maxLines: 2,
style: const TextStyle(fontSize: 14),
overflow: TextOverflow.ellipsis,
),
),
),
Padding(
padding: const EdgeInsets.only(left: 10, bottom: 6),
child: Text(
upName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 12,
color: Theme.of(context).hintColor,
),
),
),
)
],
),
Material(
Expand Down
5 changes: 3 additions & 2 deletions lib/pages/search_input/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ class _SearchInputPageState extends State<SearchInputPage> {

@override
void dispose() {
controller.onClose();
controller.onDelete();
// controller.onClose();
// controller.onDelete();
controller.dispose();
super.dispose();
}

Expand Down
5 changes: 3 additions & 2 deletions lib/pages/search_result/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ class _SearchResultPageState extends State<SearchResultPage>

@override
void dispose() {
controller.onClose();
controller.onDelete();
// controller.onClose();
// controller.onDelete();
controller.dispose();
super.dispose();
}

Expand Down
5 changes: 3 additions & 2 deletions lib/pages/search_tab_view/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ class _SearchTabViewPageState extends State<SearchTabViewPage>

@override
void dispose() {
controller.onClose();
controller.onDelete();
// controller.onClose();
// controller.onDelete();
controller.dispose();
super.dispose();
}

Expand Down
Loading

0 comments on commit 2cdd3d0

Please sign in to comment.