Skip to content

Commit

Permalink
💄 Reset bangumi page color.
Browse files Browse the repository at this point in the history
  • Loading branch information
iota9star committed Jul 14, 2021
1 parent b775aaf commit be07746
Showing 1 changed file with 51 additions and 34 deletions.
85 changes: 51 additions & 34 deletions lib/ui/pages/bangumi_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ class BangumiPage extends StatelessWidget {
child: Text(
e.name,
style: TextStyle(
color: theme.primaryColor,
color: theme.accentColor,
fontWeight: FontWeight.bold,
fontSize: 18.0,
fontSize: 20.0,
height: 1.25,
),
),
Expand All @@ -217,6 +217,7 @@ class BangumiPage extends StatelessWidget {
child: Icon(
FluentIcons.chevron_right_24_regular,
size: 20.0,
color: theme.accentColor,
),
style: TextButton.styleFrom(
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
Expand Down Expand Up @@ -256,10 +257,10 @@ class BangumiPage extends StatelessWidget {
record.title,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: textStyle14B500,
style: textStyle15B500,
),
),
sizedBoxH8,
sizedBoxH12,
Row(
children: <Widget>[
Text(
Expand All @@ -274,6 +275,7 @@ class BangumiPage extends StatelessWidget {
child: Icon(
FluentIcons.cloud_download_24_regular,
size: 20.0,
color: theme.accentColor,
),
style: TextButton.styleFrom(
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
Expand All @@ -284,14 +286,15 @@ class BangumiPage extends StatelessWidget {
},
),
),
sizedBoxW12,
sizedBoxW16,
SizedBox(
width: 20.0,
height: 20.0,
child: TextButton(
child: Icon(
FluentIcons.clipboard_link_24_regular,
size: 20.0,
color: theme.accentColor,
),
style: TextButton.styleFrom(
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
Expand All @@ -302,14 +305,15 @@ class BangumiPage extends StatelessWidget {
},
),
),
sizedBoxW12,
sizedBoxW16,
SizedBox(
width: 20.0,
height: 20.0,
child: TextButton(
child: Icon(
FluentIcons.share_24_regular,
size: 20.0,
color: theme.accentColor,
),
style: TextButton.styleFrom(
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
Expand All @@ -327,7 +331,10 @@ class BangumiPage extends StatelessWidget {
);
},
separatorBuilder: (_, __) {
return sizedBoxH12;
return Padding(
padding: edgeV8,
child: const Divider(),
);
},
),
],
Expand Down Expand Up @@ -447,8 +454,13 @@ class BangumiPage extends StatelessWidget {
);
}

Widget _buildTop(final BuildContext context, final ThemeData theme,
final BangumiModel model) {
Widget _buildTop(
final BuildContext context,
final ThemeData theme,
final BangumiModel model,
) {
final Color accentTextColor =
theme.accentColor.isDark ? Colors.white : Colors.black;
return Stack(
fit: StackFit.loose,
children: [
Expand Down Expand Up @@ -484,35 +496,40 @@ class BangumiPage extends StatelessWidget {
onPressed: () {
model.changeSubscribe();
},
child: Selector<BangumiModel, bool>(
selector: (_, model) =>
model.bangumiDetail?.subscribed == true,
shouldRebuild: (pre, next) => pre != next,
builder: (_, subscribed, __) {
return Icon(
subscribed
? FluentIcons.heart_24_filled
: FluentIcons.heart_24_regular,
color: theme.accentColor.isDark
? Colors.white
: Colors.black,
);
},
child: Container(
width: 48.0,
height: 48.0,
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
theme.accentColor.withOpacity(0.78),
theme.accentColor,
],
),
borderRadius: borderRadius24,
),
child: Selector<BangumiModel, bool>(
selector: (_, model) =>
model.bangumiDetail?.subscribed == true,
shouldRebuild: (pre, next) => pre != next,
builder: (_, subscribed, __) {
return Icon(
subscribed
? FluentIcons.heart_24_filled
: FluentIcons.heart_24_regular,
color: theme.accentColor.isDark
? Colors.white
: Colors.black,
);
},
),
),
color: theme.accentColor,
padding: edge16,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
minWidth: 0,
color: accentTextColor,
padding: EdgeInsets.zero,
shape: circleShape,
),
// spacer,
// MaterialButton(
// onPressed: () {},
// child: Icon(FluentIcons.star_24_filled),
// color: Colors.blueAccent,
// minWidth: 0,
// padding: edge16,
// shape: circleShape,
// ),
],
),
),
Expand Down

0 comments on commit be07746

Please sign in to comment.