update for always checkin points

This commit is contained in:
2024-01-17 16:08:41 +05:30
parent c95cb75934
commit 8e050267e1
4 changed files with 85 additions and 72 deletions

View File

@ -29,40 +29,40 @@ class MapWidget extends StatelessWidget {
GeoJSONMultiPoint p = i.geometry as GeoJSONMultiPoint;
//print("lat is ${p.geoSerie!.geoPoints[0].latitude} and lon is ${p.geoSerie!.geoPoints[0].longitude}");
//RegExp regex = RegExp(r'([.]*0)(?!.*\d)');
return Stack(
fit: StackFit.expand,
//mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
onTap: () {
GeoJSONFeature? fs = indexController.getFeatureForLatLong(
p.coordinates[0][1], p.coordinates[0][0]);
//print("------- fs $fs------");
if (fs != null) {
indexController.currentFeature.clear();
indexController.currentFeature.add(fs);
//print("----- fs is ${fs.properties!['photos']}");
return InkWell(
onTap: () {
GeoJSONFeature? fs = indexController.getFeatureForLatLong(
p.coordinates[0][1], p.coordinates[0][0]);
//print("------- fs $fs------");
if (fs != null) {
indexController.currentFeature.clear();
indexController.currentFeature.add(fs);
//print("----- fs is ${fs.properties!['photos']}");
Destination des = destinationController.festuretoDestination(fs);
Destination des = destinationController.festuretoDestination(fs);
DatabaseHelper db = DatabaseHelper.instance;
db.getDestinationByLatLon(des.lat!, des.lon!).then((value) {
showModalBottomSheet(
constraints: BoxConstraints.loose(
Size(Get.width, Get.height * 0.85)),
context: context,
isScrollControlled: true,
isDismissible: true,
builder: ((context) => BottomSheetNew(
destination: des, isAlreadyCheckedIn: value.isNotEmpty))
//builder:((context) => BottomSheetWidget())
).whenComplete(() {
destinationController.skipGps = false;
});
});
}
},
child: Container(
DatabaseHelper db = DatabaseHelper.instance;
db.getDestinationByLatLon(des.lat!, des.lon!).then((value) {
showModalBottomSheet(
constraints:
BoxConstraints.loose(Size(Get.width, Get.height * 0.85)),
context: context,
isScrollControlled: true,
isDismissible: true,
builder: ((context) => BottomSheetNew(
destination: des, isAlreadyCheckedIn: value.isNotEmpty))
//builder:((context) => BottomSheetWidget())
).whenComplete(() {
destinationController.skipGps = false;
});
});
}
},
child: Stack(
fit: StackFit.expand,
//mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: 32,
width: 32,
decoration: BoxDecoration(
@ -99,47 +99,47 @@ class MapWidget extends StatelessWidget {
),
],
)),
),
Transform.translate(
offset: Offset(40, 0),
child: Align(
alignment: Alignment.center,
child: Container(
color: Colors.purple.withOpacity(0.2),
// child: Text(TextUtils.getDisplayTextFeture(i),
// style: const TextStyle(
// fontSize: 16,
// fontWeight: FontWeight.bold,
// color: Colors.red,
// ))),
child: Stack(
children: <Widget>[
// Text with white outline
Text(
TextUtils.getDisplayTextFeture(i),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w700,
foreground: Paint()
..style = PaintingStyle.stroke
..strokeWidth = 1
..color = Colors.white,
Transform.translate(
offset: Offset(45, 0),
child: Align(
alignment: Alignment.center,
child: Container(
color: Colors.purple.withOpacity(0.2),
// child: Text(TextUtils.getDisplayTextFeture(i),
// style: const TextStyle(
// fontSize: 16,
// fontWeight: FontWeight.bold,
// color: Colors.red,
// ))),
child: Stack(
children: <Widget>[
// Text with white outline
Text(
TextUtils.getDisplayTextFeture(i),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w700,
foreground: Paint()
..style = PaintingStyle.stroke
..strokeWidth = 1
..color = Colors.white,
),
),
),
// Text with black fill
Text(
TextUtils.getDisplayTextFeture(i),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w700,
color: Colors.black,
// Text with black fill
Text(
TextUtils.getDisplayTextFeture(i),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w700,
color: Colors.black,
),
),
),
],
)),
),
)
],
],
)),
),
)
],
),
);
}