feat: launch google maps for location
This commit is contained in:
parent
c78c010fab
commit
58ee48527f
|
@ -115,7 +115,9 @@ class _UserScreenState extends State<UserScreen> {
|
||||||
return TableViewItem(
|
return TableViewItem(
|
||||||
leftWidget: leftWidget,
|
leftWidget: leftWidget,
|
||||||
text: itemText,
|
text: itemText,
|
||||||
rightWidget: Icon(CupertinoIcons.right_chevron,
|
rightWidget: onTap == null
|
||||||
|
? null
|
||||||
|
: Icon(CupertinoIcons.right_chevron,
|
||||||
size: 18, color: PrimerColors.gray300),
|
size: 18, color: PrimerColors.gray300),
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
);
|
);
|
||||||
|
@ -266,7 +268,13 @@ class _UserScreenState extends State<UserScreen> {
|
||||||
iconData: Octicons.location,
|
iconData: Octicons.location,
|
||||||
placeholder: 'Location',
|
placeholder: 'Location',
|
||||||
text: payload['location'],
|
text: payload['location'],
|
||||||
),
|
onTap: payload['location'] == null
|
||||||
|
? null
|
||||||
|
: () {
|
||||||
|
launch('https://www.google.com/maps/place/' +
|
||||||
|
(payload['location'] as String)
|
||||||
|
.replaceAll(RegExp(r'\s+'), ''));
|
||||||
|
}),
|
||||||
_buildTableViewItem(
|
_buildTableViewItem(
|
||||||
iconData: Octicons.mail,
|
iconData: Octicons.mail,
|
||||||
placeholder: 'Email',
|
placeholder: 'Email',
|
||||||
|
|
Loading…
Reference in New Issue