update history and start
This commit is contained in:
@ -18,7 +18,7 @@ class _HistoryPageState extends State<HistoryPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text("History"),
|
title: Text("通過履歴"),
|
||||||
),
|
),
|
||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
@ -46,25 +46,15 @@ class _HistoryPageState extends State<HistoryPage> {
|
|||||||
itemCount: dests.length,
|
itemCount: dests.length,
|
||||||
itemBuilder: (ctx, index) {
|
itemBuilder: (ctx, index) {
|
||||||
print("--- photo ${dests[index].checkin_image!} ----");
|
print("--- photo ${dests[index].checkin_image!} ----");
|
||||||
return ListTile(
|
return Padding(
|
||||||
dense: true,
|
padding: const EdgeInsets.all(8.0),
|
||||||
title: Text(dests[index].name ?? ""),
|
child: CustomWidget(title: dests[index].name!,
|
||||||
subtitle:
|
subtitle: "${dests[index].sub_loc_id} : ${dests[index].name}",
|
||||||
Text("${dests[index].sub_loc_id} : ${dests[index].name}"),
|
image1: dests[index].checkin_image != null ? Image.file(File(dests[index].checkin_image!)) : null,
|
||||||
leading: dests[index].checkin_image != null
|
image2: dests[index].buypoint_image != null ? Image.file(File(dests[index].buypoint_image!)) : null,
|
||||||
? Row(
|
),
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Container(width: 100, height: 100, child: Image.file(File(dests[index].checkin_image!))),
|
|
||||||
dests[index].buypoint_image != null ?
|
|
||||||
Container(width: 100, height: 100, child: Image.file(File(dests[index].buypoint_image!)))
|
|
||||||
:
|
|
||||||
Container(),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
: Container(),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
return Center(child: Text("No checkin yet"));
|
return Center(child: Text("No checkin yet"));
|
||||||
@ -84,3 +74,54 @@ class _HistoryPageState extends State<HistoryPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class CustomWidget extends StatelessWidget {
|
||||||
|
final Image? image1;
|
||||||
|
final Image? image2;
|
||||||
|
final String title;
|
||||||
|
final String subtitle;
|
||||||
|
|
||||||
|
CustomWidget({
|
||||||
|
this.image1,
|
||||||
|
this.image2,
|
||||||
|
required this.title,
|
||||||
|
required this.subtitle,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 104, // 50 (width of each image) + 2 (space between images) + 2*1 (padding on both sides)
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
if (image1 != null) SizedBox(width: 50, height: 100, child: image1,),
|
||||||
|
if (image1 != null && image2 != null) SizedBox(width: 2),
|
||||||
|
if (image2 != null) SizedBox(width: 50, height: 100, child: image2,),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 10),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
title,
|
||||||
|
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
|
||||||
|
maxLines: null, // Allows the text to wrap onto an unlimited number of lines
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
subtitle,
|
||||||
|
style: TextStyle(fontSize: 16),
|
||||||
|
maxLines: null, // Allows the text to wrap onto an unlimited number of lines
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -459,7 +459,10 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
saveGameState();
|
saveGameState();
|
||||||
ExternalService()
|
ExternalService()
|
||||||
.StartRogaining()
|
.StartRogaining()
|
||||||
.then((value) => Get.back());
|
.then((value){
|
||||||
|
destinationController.resetRogaining();
|
||||||
|
Get.back();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
// start
|
// start
|
||||||
|
|||||||
@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||||
# Read more about iOS versioning at
|
# Read more about iOS versioning at
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
version: 1.0.21+21
|
version: 1.0.22+22
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.1.0 <4.0.0'
|
sdk: '>=3.1.0 <4.0.0'
|
||||||
|
|||||||
Reference in New Issue
Block a user