@@ -14,6 +14,7 @@ import 'package:nipaplay/constants/acknowledgements.dart';
1414import 'package:nipaplay/utils/cupertino_settings_colors.dart' ;
1515import 'package:nipaplay/themes/cupertino/widgets/cupertino_settings_group_card.dart' ;
1616import 'package:nipaplay/themes/cupertino/widgets/cupertino_settings_tile.dart' ;
17+ import 'package:nipaplay/widgets/adaptive_markdown.dart' ;
1718
1819class CupertinoAboutPage extends StatefulWidget {
1920 const CupertinoAboutPage ({super .key});
@@ -81,6 +82,23 @@ class _CupertinoAboutPageState extends State<CupertinoAboutPage> {
8182 ? info.releaseNotes.trim ()
8283 : '暂无更新内容' ;
8384 final publishedAt = _formatPublishedAt (info.publishedAt);
85+ final brightness = CupertinoTheme .brightnessOf (context);
86+ final notesBackground = CupertinoDynamicColor .resolve (
87+ CupertinoColors .systemGrey6,
88+ context,
89+ );
90+ final notesBorder = CupertinoDynamicColor .resolve (
91+ CupertinoColors .separator,
92+ context,
93+ );
94+ final notesTextColor = CupertinoDynamicColor .resolve (
95+ CupertinoColors .label,
96+ context,
97+ );
98+ final linkColor = CupertinoDynamicColor .resolve (
99+ CupertinoColors .activeBlue,
100+ context,
101+ );
84102
85103 await BlurDialog .show (
86104 context: context,
@@ -116,13 +134,27 @@ class _CupertinoAboutPageState extends State<CupertinoAboutPage> {
116134 width: double .infinity,
117135 padding: const EdgeInsets .all (10 ),
118136 decoration: BoxDecoration (
119- color: CupertinoColors .systemGrey6 ,
137+ color: notesBackground ,
120138 borderRadius: BorderRadius .circular (10 ),
139+ border: Border .all (color: notesBorder),
121140 ),
122141 child: SizedBox (
123142 height: 220 ,
124143 child: SingleChildScrollView (
125- child: Text (notes),
144+ child: AdaptiveMarkdown (
145+ data: notes,
146+ brightness: brightness,
147+ baseTextStyle:
148+ CupertinoTheme .of (context).textTheme.textStyle.copyWith (
149+ fontSize: 13 ,
150+ height: 1.4 ,
151+ color: notesTextColor,
152+ ),
153+ linkColor: linkColor,
154+ onTapLink: (href) {
155+ _launchURL (href);
156+ },
157+ ),
126158 ),
127159 ),
128160 ),
@@ -358,7 +390,8 @@ class _CupertinoAboutPageState extends State<CupertinoAboutPage> {
358390 spacing: 10 ,
359391 runSpacing: 10 ,
360392 children: kAcknowledgementNames
361- .map ((name) => _buildAcknowledgementPill (context, name))
393+ .map ((name) =>
394+ _buildAcknowledgementPill (context, name))
362395 .toList (),
363396 ),
364397 ],
@@ -403,8 +436,7 @@ class _CupertinoAboutPageState extends State<CupertinoAboutPage> {
403436 ),
404437 const SizedBox (height: 18 ),
405438 GestureDetector (
406- onTap:
407- hasUpdate ? () => _launchURL (_updateInfo! .releaseUrl) : null ,
439+ onTap: hasUpdate ? () => _launchURL (_updateInfo! .releaseUrl) : null ,
408440 child: MouseRegion (
409441 cursor:
410442 hasUpdate ? SystemMouseCursors .click : SystemMouseCursors .basic,
@@ -480,10 +512,8 @@ class _CupertinoAboutPageState extends State<CupertinoAboutPage> {
480512 required List <TextSpan > content,
481513 Widget ? trailing,
482514 }) {
483- final base = CupertinoTheme .of (context)
484- .textTheme
485- .textStyle
486- .copyWith (height: 1.6 );
515+ final base =
516+ CupertinoTheme .of (context).textTheme.textStyle.copyWith (height: 1.6 );
487517
488518 return CupertinoSettingsGroupCard (
489519 margin: EdgeInsets .zero,
@@ -553,10 +583,7 @@ class _CupertinoAboutPageState extends State<CupertinoAboutPage> {
553583 padding: const EdgeInsets .fromLTRB (16 , 16 , 16 , 8 ),
554584 child: Text (
555585 '开源与社区' ,
556- style: CupertinoTheme .of (context)
557- .textTheme
558- .textStyle
559- .copyWith (
586+ style: CupertinoTheme .of (context).textTheme.textStyle.copyWith (
560587 fontSize: 16 ,
561588 fontWeight: FontWeight .w600,
562589 ),
@@ -596,10 +623,7 @@ class _CupertinoAboutPageState extends State<CupertinoAboutPage> {
596623 padding: const EdgeInsets .fromLTRB (16 , 0 , 16 , 16 ),
597624 child: Text (
598625 '欢迎贡献代码,或将应用发布到更多平台。不会 Dart 也没关系,借助 AI 编程同样可以。' ,
599- style: CupertinoTheme .of (context)
600- .textTheme
601- .textStyle
602- .copyWith (
626+ style: CupertinoTheme .of (context).textTheme.textStyle.copyWith (
603627 fontSize: 13 ,
604628 color: CupertinoDynamicColor .resolve (
605629 CupertinoColors .secondaryLabel,
@@ -628,10 +652,7 @@ class _CupertinoAboutPageState extends State<CupertinoAboutPage> {
628652 padding: const EdgeInsets .fromLTRB (16 , 16 , 16 , 8 ),
629653 child: Text (
630654 '赞助支持' ,
631- style: CupertinoTheme .of (context)
632- .textTheme
633- .textStyle
634- .copyWith (
655+ style: CupertinoTheme .of (context).textTheme.textStyle.copyWith (
635656 fontSize: 16 ,
636657 fontWeight: FontWeight .w600,
637658 ),
@@ -641,10 +662,7 @@ class _CupertinoAboutPageState extends State<CupertinoAboutPage> {
641662 padding: const EdgeInsets .fromLTRB (16 , 0 , 16 , 12 ),
642663 child: Text (
643664 '如果你喜欢 NipaPlay 并且希望支持项目的持续开发,欢迎通过爱发电进行赞助。' ,
644- style: CupertinoTheme .of (context)
645- .textTheme
646- .textStyle
647- .copyWith (
665+ style: CupertinoTheme .of (context).textTheme.textStyle.copyWith (
648666 fontSize: 14 ,
649667 color: CupertinoDynamicColor .resolve (
650668 CupertinoColors .label,
@@ -658,10 +676,7 @@ class _CupertinoAboutPageState extends State<CupertinoAboutPage> {
658676 padding: const EdgeInsets .fromLTRB (16 , 0 , 16 , 12 ),
659677 child: Text (
660678 '赞助者的名字将会出现在项目的 README 文件和每次软件更新后的关于页面名单中。' ,
661- style: CupertinoTheme .of (context)
662- .textTheme
663- .textStyle
664- .copyWith (
679+ style: CupertinoTheme .of (context).textTheme.textStyle.copyWith (
665680 fontSize: 14 ,
666681 color: CupertinoDynamicColor .resolve (
667682 CupertinoColors .label,
0 commit comments