import 'dart:io';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:intl/intl.dart';
import 'package:gifunavi/model/rog.dart';
import 'package:gifunavi/utils/database_helper.dart';

class HistoryController extends GetxController {
  final checkpoints = <Rog>[].obs; // Rog オブジェクトのリストに変更

  @override
  void onInit() {
    super.onInit();
    loadCheckpoints();
  }

  void loadCheckpoints() async {
    DatabaseHelper db = DatabaseHelper.instance;
    var data = await db.allRogianing();
    checkpoints.value = data;
  }
}