8-15/3
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/table_names.dart';
|
||||
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../constant/style.dart';
|
||||
import '../../../controller/home/map_page_controller.dart';
|
||||
import '../../../main.dart';
|
||||
import '../../../models/db_sql.dart';
|
||||
|
||||
GetBuilder<MapController> formSearchPlaces() {
|
||||
// DbSql sql = DbSql.instance;
|
||||
return GetBuilder<MapController>(
|
||||
builder: (controller) => Positioned(
|
||||
top: 5,
|
||||
@@ -33,6 +37,7 @@ GetBuilder<MapController> formSearchPlaces() {
|
||||
'${controller.mylocation.latitude.toString()},${controller.mylocation.longitude.toString()}',
|
||||
"${res['geometry']['location']['lat']},${res['geometry']['location']['lng']}");
|
||||
controller.places = [];
|
||||
controller.placeController.clear();
|
||||
Get.back();
|
||||
controller.bottomSheet();
|
||||
// Get.back();
|
||||
@@ -47,9 +52,26 @@ GetBuilder<MapController> formSearchPlaces() {
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Image.network(
|
||||
res['icon'],
|
||||
width: 30,
|
||||
Column(
|
||||
children: [
|
||||
Image.network(
|
||||
res['icon'],
|
||||
width: 20,
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
await sql.insertData({
|
||||
'latitude': res['geometry']
|
||||
['location']['lat'],
|
||||
'longitude': res['geometry']
|
||||
['location']['lng'],
|
||||
'name': res['name'].toString(),
|
||||
'rate': res['rating'].toString(),
|
||||
}, TableName.placesFavorite);
|
||||
},
|
||||
icon: const Icon(Icons.favorite_border),
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user