-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: presentLimited for android API 34 (#1052)
Signed-off-by: CaiJingLong <[email protected]>
- Loading branch information
1 parent
568b946
commit 5202dc9
Showing
6 changed files
with
111 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:photo_manager/photo_manager.dart'; | ||
import 'package:photo_manager_example/page/developer/issues_page/issue_index_page.dart'; | ||
|
||
class Issus1051 extends StatefulWidget { | ||
const Issus1051({Key? key}) : super(key: key); | ||
|
||
@override | ||
State<Issus1051> createState() => _Issus1051State(); | ||
} | ||
|
||
class _Issus1051State extends State<Issus1051> with IssueBase<Issus1051> { | ||
Future<void> _test() async { | ||
final status = await PhotoManager.requestPermissionExtend(); | ||
if (status.hasAccess) { | ||
await PhotoManager.presentLimited(); | ||
print('present limited'); | ||
} | ||
|
||
print('status: $status'); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return buildScaffold([ | ||
buildButton( | ||
'Test presentLimited', | ||
_test, | ||
), | ||
]); | ||
} | ||
|
||
@override | ||
int get issueNumber => 1051; | ||
|
||
@override | ||
List<TargetPlatform>? get supportPlatforms => [ | ||
TargetPlatform.android, | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters