Skip to content

Commit 0cbd815

Browse files
committed
🚀 Integrate open settings method
1 parent df15167 commit 0cbd815

File tree

1 file changed

+26
-23
lines changed

1 file changed

+26
-23
lines changed

lib/src/delegates/asset_picker_builder_delegate.dart

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -363,30 +363,33 @@ abstract class AssetPickerBuilderDelegate<A, P> {
363363
/// The tip widget displays when the access is limited.
364364
/// 当访问受限时在底部展示的提示
365365
Widget accessLimitedBottomTip(BuildContext context) {
366-
return Container(
367-
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 15),
368-
color: theme.primaryColor.withOpacity(isAppleOS ? 0.90 : 1.0),
369-
child: Row(
370-
children: <Widget>[
371-
const SizedBox(width: 5),
372-
Icon(
373-
Icons.warning,
374-
color: Colors.orange[400]!.withOpacity(.8),
375-
),
376-
const SizedBox(width: 15),
377-
Expanded(
378-
child: Text(
379-
Constants.textDelegate.accessAllTip,
380-
style: context.themeData.textTheme.caption?.copyWith(
381-
fontSize: 14,
366+
return GestureDetector(
367+
onTap: PhotoManager.openSetting,
368+
child: Container(
369+
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 15),
370+
color: theme.primaryColor.withOpacity(isAppleOS ? 0.90 : 1.0),
371+
child: Row(
372+
children: <Widget>[
373+
const SizedBox(width: 5),
374+
Icon(
375+
Icons.warning,
376+
color: Colors.orange[400]!.withOpacity(.8),
377+
),
378+
const SizedBox(width: 15),
379+
Expanded(
380+
child: Text(
381+
Constants.textDelegate.accessAllTip,
382+
style: context.themeData.textTheme.caption?.copyWith(
383+
fontSize: 14,
384+
),
382385
),
383386
),
384-
),
385-
Icon(
386-
Icons.keyboard_arrow_right,
387-
color: context.themeData.iconTheme.color?.withOpacity(.5),
388-
),
389-
],
387+
Icon(
388+
Icons.keyboard_arrow_right,
389+
color: context.themeData.iconTheme.color?.withOpacity(.5),
390+
),
391+
],
392+
),
390393
),
391394
);
392395
}
@@ -519,7 +522,7 @@ abstract class AssetPickerBuilderDelegate<A, P> {
519522
Constants.textDelegate.goToSystemSettings,
520523
style: const TextStyle(fontSize: 17.0),
521524
),
522-
onPressed: () {},
525+
onPressed: PhotoManager.openSetting,
523526
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
524527
);
525528

0 commit comments

Comments
 (0)