Merge pull request #12 from FRE-Informatica/relayout/fd-647
Relayout/fd 647
This commit is contained in:
commit
4681e8a515
|
@ -57,17 +57,26 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheet({
|
|||
bool includeDimensions = false,
|
||||
bool includeBlurHash = false,
|
||||
}) async {
|
||||
createUploadMediaListTile(String label, MediaSource mediaSource) => ListTile(
|
||||
title: Text(
|
||||
createUploadMediaListTile(
|
||||
String label, MediaSource mediaSource, IconData icon) =>
|
||||
ListTile(
|
||||
title: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(icon, color: FlutterFlowTheme.of(context).primaryText),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
label,
|
||||
textAlign: TextAlign.center,
|
||||
style: GoogleFonts.getFont(
|
||||
pickerFontFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 20,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
tileColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
dense: false,
|
||||
onTap: () => Navigator.pop(
|
||||
|
@ -83,11 +92,22 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheet({
|
|||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (!kIsWeb) ...[
|
||||
Container(
|
||||
margin: const EdgeInsets.only(top: 10),
|
||||
width: 40,
|
||||
height: 5,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[300],
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 8, 0, 0),
|
||||
child: ListTile(
|
||||
title: Text(
|
||||
'Choose Source',
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Escolha uma das opções",
|
||||
enText: "Choose one of the options"),
|
||||
textAlign: TextAlign.center,
|
||||
style: GoogleFonts.getFont(
|
||||
pickerFontFamily,
|
||||
|
@ -95,41 +115,61 @@ Future<List<SelectedFile>?> selectMediaWithSourceBottomSheet({
|
|||
.primaryText
|
||||
.withOpacity(0.65),
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 20,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
tileColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
dense: true,
|
||||
),
|
||||
),
|
||||
const Divider(),
|
||||
],
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
if (allowPhoto && allowVideo) ...[
|
||||
createUploadMediaListTile(
|
||||
'Gallery (Photo)',
|
||||
Expanded(
|
||||
child: createUploadMediaListTile(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Galeria (Foto)",
|
||||
enText: "Gallery (Photo)"),
|
||||
MediaSource.photoGallery,
|
||||
Icons.camera),
|
||||
),
|
||||
const Divider(),
|
||||
createUploadMediaListTile(
|
||||
'Gallery (Video)',
|
||||
Expanded(
|
||||
child: createUploadMediaListTile(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Galeria (Video)",
|
||||
enText: "Gallery (Video)"),
|
||||
MediaSource.videoGallery,
|
||||
),
|
||||
] else if (allowPhoto)
|
||||
createUploadMediaListTile(
|
||||
'Gallery',
|
||||
MediaSource.photoGallery,
|
||||
Icons.videocam),
|
||||
)
|
||||
] else if (allowPhoto)
|
||||
Expanded(
|
||||
child: createUploadMediaListTile(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Galeria", enText: "Gallery"),
|
||||
MediaSource.photoGallery,
|
||||
Icons.photo))
|
||||
else
|
||||
createUploadMediaListTile(
|
||||
'Gallery',
|
||||
Expanded(
|
||||
child: createUploadMediaListTile(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Galeria", enText: "Gallery"),
|
||||
MediaSource.videoGallery,
|
||||
Icons.videocam),
|
||||
),
|
||||
if (!kIsWeb) ...[
|
||||
const Divider(),
|
||||
createUploadMediaListTile('Camera', MediaSource.camera),
|
||||
const Divider(),
|
||||
Expanded(
|
||||
child: createUploadMediaListTile(
|
||||
FFLocalizations.of(context).getVariableText(
|
||||
ptText: "Camera", enText: "Camera"),
|
||||
MediaSource.camera,
|
||||
Icons.camera_alt),
|
||||
)
|
||||
],
|
||||
const SizedBox(height: 10),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
],
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue