Skip to content

Commit 00ed971

Browse files
authored
Merge pull request #17 from gtt-project/fix/gtt-export-ui
Changed to subtitle so pull-down is at bottom
2 parents 902f0d6 + 96429a8 commit 00ed971

File tree

1 file changed

+37
-34
lines changed

1 file changed

+37
-34
lines changed

lib/com/hydrologis/smash/import_export_plugins/export/gtt/gtt_export.dart

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,20 @@ class _GttExportWidgetState extends State<GttExportWidget> {
112112

113113
Future<void> init() async {
114114
_projects = [
115-
DropdownMenuItem(child: Text(IEL.of(context).gttExport_selectProject), value: "none")
115+
DropdownMenuItem(
116+
child: Text(IEL.of(context).gttExport_selectProject), value: "none")
116117
];
117118
_gpsLogsProj = [
118-
DropdownMenuItem(child: Text(IEL.of(context).gttExport_selectProject), value: "none")
119+
DropdownMenuItem(
120+
child: Text(IEL.of(context).gttExport_selectProject), value: "none")
119121
];
120122
_simpleNotesProj = [
121-
DropdownMenuItem(child: Text(IEL.of(context).gttExport_selectProject), value: "none")
123+
DropdownMenuItem(
124+
child: Text(IEL.of(context).gttExport_selectProject), value: "none")
122125
];
123126
_imagesProj = [
124-
DropdownMenuItem(child: Text(IEL.of(context).gttExport_selectProject), value: "none")
127+
DropdownMenuItem(
128+
child: Text(IEL.of(context).gttExport_selectProject), value: "none")
125129
];
126130

127131
_serverUrl = GpPreferences().getStringSync(GttUtilities.KEY_GTT_SERVER_URL);
@@ -359,30 +363,35 @@ class _GttExportWidgetState extends State<GttExportWidget> {
359363
bold: true),
360364
),
361365
Padding(
362-
padding: SmashUI
363-
.defaultPadding(),
364-
child: SmashUI.smallText(
365-
IEL
366-
.of(context)
367-
.gttExport_dataUploadedSelectedProject, //"The following data will be uploaded upon sync."
368-
color: Colors.grey),
369-
),
370-
Padding(
371-
padding: SmashUI
372-
.defaultPadding(),
366+
padding:
367+
EdgeInsets.symmetric(
368+
vertical: SmashUI
369+
.DEFAULT_PADDING,
370+
horizontal: 24),
373371
child: SmashUI.smallText(
374-
IEL
375-
.of(context)
376-
.gttExport_contactAdmin, //"The following data will be uploaded upon sync."
372+
//"The following data will be uploaded upon sync. If there is no available project, please contact your admin."
373+
"${IEL.of(context).gttExport_dataUploadedSelectedProject} ${IEL.of(context).gttExport_contactAdmin}",
377374
color: Colors.grey),
378375
),
379376
Expanded(
380377
child: ListView(
378+
padding: EdgeInsets.all(
379+
SmashUI
380+
.DEFAULT_PADDING),
381381
children: <Widget>[
382382
// projWidget,
383-
SizedBox(
384-
height: 32,
383+
SizedBox(height: 8),
384+
ListTile(
385+
leading: Icon(
386+
SmashIcons
387+
.formNotesIcon,
388+
color: SmashColors
389+
.mainDecorations,
390+
),
391+
title: SmashUI.normalText(
392+
"${IEL.of(context).gttExport_formNotes}: $_formNotesCount"), //
385393
),
394+
SizedBox(height: 16),
386395
ListTile(
387396
leading: Icon(
388397
SmashIcons.logIcon,
@@ -391,7 +400,7 @@ class _GttExportWidgetState extends State<GttExportWidget> {
391400
),
392401
title: SmashUI.normalText(
393402
"${IEL.of(context).gttExport_gpsLogs}: $_gpsLogCount"), //"Gps Logs:"
394-
trailing:
403+
subtitle:
395404
DropdownButton<
396405
String>(
397406
items: _gpsLogsProj,
@@ -401,9 +410,10 @@ class _GttExportWidgetState extends State<GttExportWidget> {
401410
setState(() =>
402411
_selectedGpsLogProj =
403412
s.toString()),
413+
isExpanded: true,
404414
),
405415
),
406-
416+
SizedBox(height: 16),
407417
ListTile(
408418
leading: Icon(
409419
SmashIcons
@@ -413,7 +423,7 @@ class _GttExportWidgetState extends State<GttExportWidget> {
413423
),
414424
title: SmashUI.normalText(
415425
"${IEL.of(context).gttExport_simpleNotes}: $_simpleNotesCount"), //"Simple Notes"
416-
trailing:
426+
subtitle:
417427
DropdownButton<
418428
String>(
419429
items:
@@ -425,8 +435,10 @@ class _GttExportWidgetState extends State<GttExportWidget> {
425435
_selectedSimpleNotesProj =
426436
s.toString();
427437
}),
438+
isExpanded: true,
428439
),
429440
),
441+
SizedBox(height: 16),
430442
ListTile(
431443
leading: Icon(
432444
SmashIcons
@@ -436,7 +448,7 @@ class _GttExportWidgetState extends State<GttExportWidget> {
436448
),
437449
title: SmashUI.normalText(
438450
"${IEL.of(context).gttExport_images}: $_imagesCount"), //"Images"
439-
trailing:
451+
subtitle:
440452
DropdownButton<
441453
String>(
442454
items: _imagesProj,
@@ -446,18 +458,9 @@ class _GttExportWidgetState extends State<GttExportWidget> {
446458
setState(() =>
447459
_selectedImagesProj =
448460
s.toString()),
461+
isExpanded: true,
449462
),
450463
),
451-
ListTile(
452-
leading: Icon(
453-
SmashIcons
454-
.formNotesIcon,
455-
color: SmashColors
456-
.mainDecorations,
457-
),
458-
title: SmashUI.normalText(
459-
"${IEL.of(context).gttExport_formNotes}: $_formNotesCount"), //
460-
),
461464
],
462465
),
463466
),

0 commit comments

Comments
 (0)