Skip to content

Commit 5a0ef1c

Browse files
committed
💄 Updating the UI.
1 parent 00bb094 commit 5a0ef1c

18 files changed

+78
-41
lines changed

ff_annotation_route_commands

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-s --supper-arguments
1+
-s --super-arguments

lib/mikan_flutter_route.dart

+6-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/mikan_flutter_routes.dart

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/model/bangumi_details.dart

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'package:mikan_flutter/internal/consts.dart';
12
import 'package:mikan_flutter/model/subgroup_bangumi.dart';
23

34
class BangumiDetail {
@@ -9,6 +10,10 @@ class BangumiDetail {
910
late String intro;
1011
late Map<String, SubgroupBangumi> subgroupBangumis;
1112

13+
String get shareString {
14+
return "$name:${MikanUrl.BASE_URL}/${MikanUrl.BANGUMI}/$id";
15+
}
16+
1217
@override
1318
bool operator ==(Object other) =>
1419
identical(this, other) ||

lib/topvars.dart

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
66
import 'package:mikan_flutter/internal/extension.dart';
77
import 'package:mikan_flutter/internal/screen.dart';
88

9+
const edgeH16V4 = const EdgeInsets.symmetric(horizontal: 16.0, vertical: 4.0);
910
const edgeH16V8 = const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0);
1011
const edgeHT16 = const EdgeInsets.only(left: 16.0, right: 16.0, top: 16.0);
1112
const edgeH16T4 = const EdgeInsets.only(left: 16.0, right: 16.0, top: 4.0);
@@ -84,6 +85,12 @@ final edgeHT16B24WithNavbarHeight = EdgeInsets.only(
8485
bottom: 24.0 + Screen.navBarHeight,
8586
);
8687

88+
final edgeH16B24WithNavbarHeight = EdgeInsets.only(
89+
left: 16.0,
90+
right: 16.0,
91+
bottom: 24.0 + Screen.navBarHeight,
92+
);
93+
8794
const borderRadiusT16 = const BorderRadius.only(
8895
topRight: radius16,
8996
topLeft: radius16,

lib/ui/fragments/fonts_fragment.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class FontsFragment extends StatelessWidget {
105105
child: Row(
106106
children: [
107107
MaterialButton(
108-
minWidth: 28.0,
108+
minWidth: 32.0,
109109
color: theme.backgroundColor,
110110
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
111111
shape: circleShape,
@@ -126,7 +126,7 @@ class FontsFragment extends StatelessWidget {
126126
),
127127
),
128128
MaterialButton(
129-
minWidth: 28.0,
129+
minWidth: 32.0,
130130
color: theme.backgroundColor,
131131
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
132132
shape: circleShape,

lib/ui/fragments/index_fragment.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,8 @@ class _IndexFragmentState extends State<IndexFragment> {
373373
FluentIcons.chevron_down_24_regular,
374374
size: 14.0,
375375
),
376-
minWidth: 24.0,
377-
height: 24.0,
376+
minWidth: 28.0,
377+
height: 28.0,
378378
color: hasScrolled
379379
? theme.scaffoldBackgroundColor
380380
: theme.backgroundColor,

lib/ui/fragments/search_fragment.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ class SearchFragment extends StatelessWidget {
405405
return Row(
406406
children: [
407407
MaterialButton(
408-
minWidth: 28.0,
408+
minWidth: 32.0,
409409
color: theme.backgroundColor,
410410
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
411411
shape: circleShape,

lib/ui/fragments/select_season_fragment.dart

+4-16
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class SelectSeasonFragment extends StatelessWidget {
2121
final ThemeData theme = Theme.of(context);
2222
final indexModel = Provider.of<IndexModel>(context, listen: false);
2323
return Material(
24-
color: theme.scaffoldBackgroundColor,
24+
color: theme.backgroundColor,
2525
child: NotificationListener(
2626
onNotification: (notification) {
2727
if (notification is OverscrollIndicatorNotification) {
@@ -47,19 +47,7 @@ class SelectSeasonFragment extends StatelessWidget {
4747
final IndexModel indexModel,
4848
) {
4949
return SliverPinnedToBoxAdapter(
50-
child: Container(
51-
decoration: BoxDecoration(
52-
color: theme.backgroundColor,
53-
boxShadow: [
54-
BoxShadow(
55-
color: Colors.black.withOpacity(0.024),
56-
offset: Offset(0, 1),
57-
blurRadius: 3.0,
58-
spreadRadius: 3.0,
59-
),
60-
],
61-
borderRadius: borderRadiusB16,
62-
),
50+
child: Padding(
6351
padding: edge16,
6452
child: Row(
6553
children: <Widget>[
@@ -82,7 +70,7 @@ class SelectSeasonFragment extends StatelessWidget {
8270
FluentIcons.chevron_right_24_regular,
8371
size: 16.0,
8472
),
85-
minWidth: 28.0,
73+
minWidth: 32.0,
8674
padding: EdgeInsets.zero,
8775
color: theme.scaffoldBackgroundColor,
8876
shape: circleShape,
@@ -147,7 +135,7 @@ class SelectSeasonFragment extends StatelessWidget {
147135
final IndexModel indexModel,
148136
) {
149137
return SliverPadding(
150-
padding: edgeHB16T8,
138+
padding: edgeH16B24WithNavbarHeight,
151139
sliver: Selector<IndexModel, List<YearSeason>>(
152140
selector: (_, model) => model.years,
153141
shouldRebuild: (pre, next) => pre.ne(next),

lib/ui/fragments/subscribed_fragment.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ class SubscribedFragment extends StatelessWidget {
240240
);
241241
},
242242
color: theme.backgroundColor,
243-
minWidth: 28.0,
243+
minWidth: 32.0,
244244
padding: EdgeInsets.zero,
245245
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
246246
shape: circleShape,
@@ -288,7 +288,7 @@ class SubscribedFragment extends StatelessWidget {
288288
_toRecentSubscribedPage(context);
289289
},
290290
color: theme.backgroundColor,
291-
minWidth: 28.0,
291+
minWidth: 32.0,
292292
padding: EdgeInsets.zero,
293293
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
294294
shape: circleShape,
@@ -528,7 +528,7 @@ class SubscribedFragment extends StatelessWidget {
528528
_toRecentSubscribedPage(context);
529529
},
530530
color: theme.backgroundColor,
531-
minWidth: 28.0,
531+
minWidth: 32.0,
532532
padding: EdgeInsets.zero,
533533
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
534534
shape: circleShape,

lib/ui/fragments/theme_panel_fragment.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ThemePanelFragment extends StatelessWidget {
4343
onPressed: () {
4444
this._showEditThemePanel(context);
4545
},
46-
minWidth: 28.0,
46+
minWidth: 32.0,
4747
shape: circleShape,
4848
color: theme.scaffoldBackgroundColor,
4949
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,

lib/ui/pages/bangumi_page.dart

+35-7
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class BangumiPage extends StatelessWidget {
100100
),
101101
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
102102
color: theme.backgroundColor,
103-
minWidth: 28.0,
103+
minWidth: 32.0,
104104
padding: EdgeInsets.zero,
105105
shape: circleShape,
106106
),
@@ -465,6 +465,8 @@ class BangumiPage extends StatelessWidget {
465465
) {
466466
final Color accentTextColor =
467467
theme.accentColor.isDark ? Colors.white : Colors.black;
468+
final Color primaryTextColor =
469+
theme.primaryColor.isDark ? Colors.white : Colors.black;
468470
return Stack(
469471
fit: StackFit.loose,
470472
children: [
@@ -496,6 +498,34 @@ class BangumiPage extends StatelessWidget {
496498
children: [
497499
_buildCover(cover, model),
498500
spacer,
501+
MaterialButton(
502+
onPressed: () {
503+
model.bangumiDetail?.shareString.share();
504+
},
505+
child: Container(
506+
width: 42.0,
507+
height: 42.0,
508+
decoration: BoxDecoration(
509+
gradient: LinearGradient(
510+
colors: [
511+
theme.accentColor.withOpacity(0.78),
512+
theme.accentColor,
513+
],
514+
),
515+
borderRadius: borderRadius24,
516+
),
517+
child: Icon(
518+
FluentIcons.share_24_regular,
519+
color: accentTextColor,
520+
),
521+
),
522+
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
523+
minWidth: 0,
524+
color: accentTextColor,
525+
padding: EdgeInsets.zero,
526+
shape: circleShape,
527+
),
528+
sizedBoxW16,
499529
MaterialButton(
500530
onPressed: () {
501531
model.changeSubscribe();
@@ -506,8 +536,8 @@ class BangumiPage extends StatelessWidget {
506536
decoration: BoxDecoration(
507537
gradient: LinearGradient(
508538
colors: [
509-
theme.accentColor.withOpacity(0.78),
510-
theme.accentColor,
539+
theme.primaryColor.withOpacity(0.78),
540+
theme.primaryColor,
511541
],
512542
),
513543
borderRadius: borderRadius24,
@@ -521,16 +551,14 @@ class BangumiPage extends StatelessWidget {
521551
subscribed
522552
? FluentIcons.heart_24_filled
523553
: FluentIcons.heart_24_regular,
524-
color: theme.accentColor.isDark
525-
? Colors.white
526-
: Colors.black,
554+
color: primaryTextColor,
527555
);
528556
},
529557
),
530558
),
531559
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
532560
minWidth: 0,
533-
color: accentTextColor,
561+
color: primaryTextColor,
534562
padding: EdgeInsets.zero,
535563
shape: circleShape,
536564
),

lib/ui/pages/recent_subscribed_page.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class RecentSubscribedPage extends StatelessWidget {
146146
FluentIcons.chevron_left_24_regular,
147147
size: 16.0,
148148
),
149-
minWidth: 28.0,
149+
minWidth: 32.0,
150150
padding: EdgeInsets.zero,
151151
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
152152
shape: circleShape,

lib/ui/pages/record_detail_page.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class RecordDetailPage extends StatelessWidget {
7171
size: 16.0,
7272
),
7373
color: theme.backgroundColor,
74-
minWidth: 28.0,
74+
minWidth: 32.0,
7575
padding: EdgeInsets.zero,
7676
shape: circleShape,
7777
),

lib/ui/pages/season_list_page.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ class SeasonListPage extends StatelessWidget {
240240
size: 16.0,
241241
),
242242
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
243-
minWidth: 28.0,
243+
minWidth: 32.0,
244244
padding: EdgeInsets.zero,
245245
shape: circleShape,
246246
color: hasScrolled

lib/ui/pages/single_season_page.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class SingleSeasonPage extends StatelessWidget {
134134
size: 16.0,
135135
),
136136
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
137-
minWidth: 28.0,
137+
minWidth: 32.0,
138138
padding: EdgeInsets.zero,
139139
shape: circleShape,
140140
color: hasScrolled

lib/ui/pages/subgroup_page.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class SubgroupPage extends StatelessWidget {
173173
size: 16.0,
174174
),
175175
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
176-
minWidth: 28.0,
176+
minWidth: 32.0,
177177
padding: EdgeInsets.zero,
178178
shape: circleShape,
179179
color: hasScrolled

lib/ui/pages/subscribed_season_page.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class SubscribedSeasonPage extends StatelessWidget {
207207
);
208208
},
209209
color: theme.backgroundColor,
210-
minWidth: 28.0,
210+
minWidth: 32.0,
211211
padding: EdgeInsets.zero,
212212
shape: circleShape,
213213
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
@@ -250,7 +250,7 @@ class SubscribedSeasonPage extends StatelessWidget {
250250
size: 16.0,
251251
),
252252
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
253-
minWidth: 28.0,
253+
minWidth: 32.0,
254254
padding: EdgeInsets.zero,
255255
shape: circleShape,
256256
color: hasScrolled

0 commit comments

Comments
 (0)