CPラベルが1文字しか出ない、起動が遅い

This commit is contained in:
2024-04-14 20:16:13 +09:00
parent f6b2a6c7d4
commit 4ef42216f8
18 changed files with 1520 additions and 372 deletions

View File

@ -0,0 +1,43 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:rogapp/model/destination.dart';
import 'package:rogapp/pages/destination/destination_controller.dart';
import 'package:rogapp/widgets/bottom_sheets/bottom_sheet_base.dart';
class BottomSheetStartGoal extends BottomSheetBase {
BottomSheetStartGoal({Key? key, required Destination destination})
: super(key: key, destination: destination);
final DestinationController destinationController =
Get.find<DestinationController>();
@override
List<Widget> buildWidgets(BuildContext context) {
// super.buildWidgets(context) を継承して、追加のウィジェットをリストに組み込む
return [
...super.buildWidgets(context),
ElevatedButton(
onPressed: destinationController.distanceToStart() <= 100
? () async {
// 「ロゲ開始」または「ゴール時間撮影」ボタンがタップされた際の処理
// TODO: Implement start game or goal time capture logic based on game state
}
: null,
child: Obx(
() => Text(
destinationController.isInRog.value ? 'ゴール時間撮影' : 'ロゲ開始',
),
),
),
];
}
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
children: buildWidgets(context),
),
);
}
}