info: show coordinates along address

This commit is contained in:
Thibault Deckers 2020-08-21 11:11:14 +09:00
parent f8928f557f
commit cf4be6a7a3
2 changed files with 4 additions and 13 deletions

View file

@ -178,7 +178,7 @@ class SectionRow extends StatelessWidget {
children: [
buildDivider(),
Padding(
padding: EdgeInsets.all(16.0),
padding: EdgeInsets.all(16),
child: Icon(
icon,
size: dim,

View file

@ -83,18 +83,12 @@ class _LocationSectionState extends State<LocationSection> {
if (country != null && country.isNotEmpty) filters.add(LocationFilter(LocationLevel.country, '$country;${address.countryCode}'));
final place = address.place;
if (place != null && place.isNotEmpty) filters.add(LocationFilter(LocationLevel.place, place));
} else if (entry.hasGps) {
location = toDMS(entry.latLng).join(', ');
}
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (widget.showTitle)
Padding(
padding: EdgeInsets.only(bottom: 8),
child: SectionRow(AIcons.location),
),
if (widget.showTitle) SectionRow(AIcons.location),
NotificationListener(
onNotification: (notification) {
if (notification is MapStyleChangedNotification) setState(() {});
@ -114,11 +108,8 @@ class _LocationSectionState extends State<LocationSection> {
style: settings.infoMapStyle,
),
),
if (location.isNotEmpty)
Padding(
padding: EdgeInsets.only(top: 8),
child: InfoRowGroup({'Address': location}),
),
if (entry.hasGps) InfoRowGroup({'Coordinates': toDMS(entry.latLng).join(', ')}),
if (location.isNotEmpty) InfoRowGroup({'Address': location}),
if (filters.isNotEmpty)
Padding(
padding: EdgeInsets.symmetric(horizontal: AvesFilterChip.outlineWidth / 2) + EdgeInsets.only(top: 8),