ponshu-room-lite/lib/providers/quota_lockout_provider.dart

14 lines
623 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:flutter_riverpod/flutter_riverpod.dart';
class QuotaLockoutNotifier extends Notifier<DateTime?> {
@override
DateTime? build() => null;
void set(DateTime? value) => state = value;
}
/// Gemini API 429レート制限発生後の一時ロックアウト期限を管理するプロバイダー。
///
/// カメラ・詳細画面の両方で共有し、画面遷移をまたいで状態を保持する。
/// null = ロックアウトなし、DateTime = その時刻まで再解析を禁止
final quotaLockoutProvider = NotifierProvider<QuotaLockoutNotifier, DateTime?>(QuotaLockoutNotifier.new);