CPラベルが1文字しか出ない、起動が遅い
This commit is contained in:
43
lib/widgets/bottom_sheets/bottom_sheet_start_goal.dart
Normal file
43
lib/widgets/bottom_sheets/bottom_sheet_start_goal.dart
Normal 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),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user