update manual start
This commit is contained in:
@ -38,22 +38,33 @@ class _HistoryPageState extends State<HistoryPage> {
|
|||||||
} else if (snapshot.hasData) {
|
} else if (snapshot.hasData) {
|
||||||
final dests = snapshot.data;
|
final dests = snapshot.data;
|
||||||
if (dests!.length > 0) {
|
if (dests!.length > 0) {
|
||||||
return Center(
|
print("----- history -----");
|
||||||
child: ListView.builder(itemBuilder:(ctx, index){
|
return Container(
|
||||||
|
width: MediaQuery.of(context).size.width,
|
||||||
|
height: 150,
|
||||||
|
child: Expanded(
|
||||||
|
child: ListView.builder(
|
||||||
|
itemCount: dests.length,
|
||||||
|
itemBuilder: (ctx, index) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(dests[index].name?? ""),
|
title: Text(dests[index].name ?? ""),
|
||||||
subtitle: Text(dests[index].address ?? ""),
|
subtitle:
|
||||||
leading: dests[0].photos != null ? Image.file(File(dests[0].photos!)) : Container(),
|
Text(dests[index].address ?? ""),
|
||||||
|
leading: dests[0].photos != null
|
||||||
|
? Container(width: 100, height: 100, child: Image.file(File(dests[0].photos!)))
|
||||||
|
: Container(),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
);
|
));
|
||||||
} else {
|
} else {
|
||||||
return Center(child: Text("No checkin yet"));
|
return Center(child: Text("No checkin yet"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else if (snapshot.connectionState ==
|
||||||
else if(snapshot.connectionState == ConnectionState.waiting){
|
ConnectionState.waiting) {
|
||||||
return Center(child: CircularProgressIndicator(),);
|
return Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return Container();
|
return Container();
|
||||||
}),
|
}),
|
||||||
|
|||||||
@ -509,7 +509,8 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
as GeoJsonFeature<GeoJsonMultiPoint>;
|
as GeoJsonFeature<GeoJsonMultiPoint>;
|
||||||
Position position =
|
Position position =
|
||||||
await Geolocator.getCurrentPosition(
|
await Geolocator.getCurrentPosition(
|
||||||
desiredAccuracy: LocationAccuracy.lowest,
|
desiredAccuracy:
|
||||||
|
LocationAccuracy.bestForNavigation,
|
||||||
forceAndroidLocationManager: true);
|
forceAndroidLocationManager: true);
|
||||||
print("------- position -------- $position");
|
print("------- position -------- $position");
|
||||||
Destination ds = Destination(
|
Destination ds = Destination(
|
||||||
@ -531,17 +532,40 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
color:
|
color:
|
||||||
Theme.of(context).colorScheme.onPrimary),
|
Theme.of(context).colorScheme.onPrimary),
|
||||||
)),
|
)),
|
||||||
SizedBox(width: 10,),
|
SizedBox(
|
||||||
|
width: 10,
|
||||||
|
),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
Theme.of(context).colorScheme.secondary),
|
Theme.of(context).colorScheme.secondary),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
destinationController.CallforCheckin(
|
final Destination dd =
|
||||||
destinationController.festuretoDestination(
|
destinationController.festuretoDestination(
|
||||||
indexController.currentFeature[0]));
|
indexController.currentFeature[0]);
|
||||||
|
if (dd.cp == -1) {
|
||||||
|
destinationController.is_in_rog.value = true;
|
||||||
|
destinationController.addToRogaining(
|
||||||
|
destinationController.current_lat,
|
||||||
|
destinationController.current_lon,
|
||||||
|
indexController.currentDestinationFeature[0]
|
||||||
|
.location_id!);
|
||||||
|
ExternalService()
|
||||||
|
.StartRogaining()
|
||||||
|
.then((value) => Get.back());
|
||||||
|
} else {
|
||||||
|
destinationController.CallforCheckin(dd);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: Text("チェックイン",
|
child: Text(
|
||||||
|
destinationController
|
||||||
|
.festuretoDestination(
|
||||||
|
indexController
|
||||||
|
.currentFeature[0])
|
||||||
|
.cp ==
|
||||||
|
-1
|
||||||
|
? "ロゲ開始"
|
||||||
|
: "チェックイン",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
|
|||||||
Reference in New Issue
Block a user