mirror of
https://github.com/git-touch/git-touch
synced 2025-02-21 14:01:02 +01:00
feat: launch google maps for location
This commit is contained in:
parent
c78c010fab
commit
58ee48527f
@ -115,8 +115,10 @@ 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
|
||||||
size: 18, color: PrimerColors.gray300),
|
? null
|
||||||
|
: Icon(CupertinoIcons.right_chevron,
|
||||||
|
size: 18, color: PrimerColors.gray300),
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -263,10 +265,16 @@ class _UserScreenState extends State<UserScreen> {
|
|||||||
text: payload['company'],
|
text: payload['company'],
|
||||||
),
|
),
|
||||||
_buildTableViewItem(
|
_buildTableViewItem(
|
||||||
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…
x
Reference in New Issue
Block a user