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