mirror of
https://github.com/localsend/localsend.git
synced 2026-06-22 20:00:07 +00:00
fix(android): preserve location data in media picker (#2742)
This commit is contained in:
@@ -234,6 +234,17 @@ Future<void> _pickFolder(BuildContext context, Ref ref) async {
|
||||
}
|
||||
|
||||
Future<void> _pickMedia(BuildContext context, Ref ref) async {
|
||||
if (checkPlatform([TargetPlatform.android])) {
|
||||
await PhotoManager.requestPermissionExtend(
|
||||
requestOption: const PermissionRequestOption(
|
||||
androidPermission: AndroidPermission(
|
||||
type: RequestType.common,
|
||||
mediaLocation: true,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
final oldBrightness = Theme.of(context).brightness;
|
||||
// ignore: use_build_context_synchronously
|
||||
final List<AssetEntity>? result = await AssetPicker.pickAssets(
|
||||
|
||||
Reference in New Issue
Block a user