14 lines
623 B
Dart
14 lines
623 B
Dart
|
|
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);
|