fix(ui): fix attachment picker ui

This commit is contained in:
Salvatore Giordano
2022-05-04 09:35:28 +02:00
parent 9204a6213a
commit 45ca096f94
@@ -281,27 +281,27 @@ class _StreamAttachmentPickerState extends State<StreamAttachmentPicker> {
icon: widget.customAttachmentTypes[i]
.iconBuilder(context, _filePickerIndex == i + 1),
),
],
),
const Spacer(),
FutureBuilder(
future: PhotoManager.requestPermissionExtend(),
builder: (context, snapshot) {
if (snapshot.hasData &&
snapshot.data == PermissionState.limited) {
return TextButton(
child: Text(context.translations.viewLibrary),
onPressed: () async {
await PhotoManager.presentLimited();
_mediaListViewController.updateMedia(
newValue: true,
const Spacer(),
FutureBuilder(
future: PhotoManager.requestPermissionExtend(),
builder: (context, snapshot) {
if (snapshot.hasData &&
snapshot.data == PermissionState.limited) {
return TextButton(
child: Text(context.translations.viewLibrary),
onPressed: () async {
await PhotoManager.presentLimited();
_mediaListViewController.updateMedia(
newValue: true,
);
},
);
},
);
}
}
return const SizedBox.shrink();
},
return const SizedBox.shrink();
},
),
],
),
DecoratedBox(
decoration: BoxDecoration(