|
@@ -13,7 +13,6 @@ class FriendsList extends StatefulWidget {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
class _FriendsListState extends State<FriendsList> {
|
|
class _FriendsListState extends State<FriendsList> {
|
|
|
-
|
|
|
|
|
void _shareLocation(String friendId) async {
|
|
void _shareLocation(String friendId) async {
|
|
|
try {
|
|
try {
|
|
|
await ChallengeLocationService.shareChallengeLocation(friendId);
|
|
await ChallengeLocationService.shareChallengeLocation(friendId);
|
|
@@ -58,8 +57,12 @@ class _FriendsListState extends State<FriendsList> {
|
|
|
Widget _friendTile(Friend friend) {
|
|
Widget _friendTile(Friend friend) {
|
|
|
return Card(
|
|
return Card(
|
|
|
child: ListTile(
|
|
child: ListTile(
|
|
|
- title: Text("${friend.name} ${friend.surname}"),
|
|
|
|
|
- trailing: TextButton(
|
|
|
|
|
|
|
+ title: Text(
|
|
|
|
|
+ "${friend.name} ${friend.surname}",
|
|
|
|
|
+ textAlign: TextAlign.center,
|
|
|
|
|
+ style: const TextStyle(fontSize: 18),
|
|
|
|
|
+ ),
|
|
|
|
|
+ subtitle: TextButton(
|
|
|
child: const Text("Share challenge location"),
|
|
child: const Text("Share challenge location"),
|
|
|
onPressed: () => _shareLocation(friend.id),
|
|
onPressed: () => _shareLocation(friend.id),
|
|
|
),
|
|
),
|