Semi Final 7th Aug 2024

This commit is contained in:
2024-08-07 14:24:05 +09:00
parent 66ade1fe09
commit 347861e5a1
23 changed files with 342 additions and 160 deletions

View File

@ -5,6 +5,7 @@ import 'package:get/get.dart';
import 'package:intl/intl.dart';
import 'package:rogapp/pages/entry/entry_controller.dart';
import 'package:rogapp/routes/app_pages.dart';
import 'package:timezone/timezone.dart' as tz;
class EntryListPage extends GetView<EntryController> {
@override
@ -12,6 +13,12 @@ class EntryListPage extends GetView<EntryController> {
return Scaffold(
appBar: AppBar(
title: Text('エントリー管理'),
actions: [
IconButton(
icon: Icon(Icons.add),
onPressed: () => Get.toNamed(AppPages.ENTRY_DETAIL, arguments: {'mode': 'new'}),
),
],
),
body: Obx(() {
if (controller.entries.isEmpty) {
@ -54,7 +61,8 @@ class EntryListPage extends GetView<EntryController> {
if (date == null) {
return '日時未設定';
}
return DateFormat('yyyy-MM-dd').format(date);
final jstDate = tz.TZDateTime.from(date, tz.getLocation('Asia/Tokyo'));
return DateFormat('yyyy-MM-dd').format(jstDate);
}
}