@@ -8,6 +8,7 @@ import 'dart:typed_data';
8
8
import 'dart:ui' as ui;
9
9
10
10
import 'package:flutter/material.dart' ;
11
+ import 'package:flutter/gestures.dart' ;
11
12
import 'package:flutter/services.dart' ;
12
13
13
14
import '../constants/constants.dart' ;
@@ -108,6 +109,14 @@ abstract class AssetPickerBuilderDelegate<A, P> {
108
109
? SystemUiOverlayStyle .light
109
110
: SystemUiOverlayStyle .dark);
110
111
112
+ /// The color for interactive texts.
113
+ /// 可交互的文字的颜色
114
+ Color interactiveTextColor (BuildContext context) => Color .lerp (
115
+ context.themeData.iconTheme.color? .withOpacity (.7 ) ?? Colors .white,
116
+ Colors .blueAccent,
117
+ 0.4 ,
118
+ )! ;
119
+
111
120
/// Whether the current platform is Apple OS.
112
121
/// 当前平台是否苹果系列系统 (iOS & MacOS)
113
122
bool get isAppleOS => Platform .isIOS || Platform .isMacOS;
@@ -514,13 +523,7 @@ abstract class AssetPickerBuilderDelegate<A, P> {
514
523
onTap: () => permissionOverlayHidden.value = true ,
515
524
child: Text (
516
525
Constants .textDelegate.accessLimitedAssets,
517
- style: TextStyle (
518
- color: Color .lerp (
519
- context.themeData.iconTheme.color? .withOpacity (.5 ),
520
- Colors .blue,
521
- 0.3 ,
522
- ),
523
- ),
526
+ style: TextStyle (color: interactiveTextColor (context)),
524
527
),
525
528
);
526
529
@@ -1240,6 +1243,13 @@ class DefaultAssetPickerBuilderDelegate
1240
1243
TextSpan (
1241
1244
text: Constants .textDelegate.viewingLimitedAssetsTip,
1242
1245
),
1246
+ TextSpan (
1247
+ text: ' '
1248
+ '${Constants .textDelegate .changeAccessibleLimitedAssets }' ,
1249
+ style: TextStyle (color: interactiveTextColor (context)),
1250
+ recognizer: TapGestureRecognizer ()
1251
+ ..onTap = PhotoManager .presentLimited,
1252
+ ),
1243
1253
],
1244
1254
),
1245
1255
style: context.themeData.textTheme.caption? .copyWith (
0 commit comments