Files
rog_app/lib/provider/game_state_provider.dart

23 lines
534 B
Dart
Raw Normal View History

2023-09-08 21:19:12 +05:30
import 'package:flutter_riverpod/flutter_riverpod.dart';
2023-10-06 16:25:21 +05:30
import 'package:rogapp/model/game_state_instance.dart';
2023-09-08 21:19:12 +05:30
2023-10-06 16:25:21 +05:30
final gameStateNotifierProvider =
StateNotifierProvider<GameStaticState, GameInsStatetance>((ref) {
return GameStaticState();
2023-09-08 21:19:12 +05:30
});
2023-10-06 16:25:21 +05:30
class GameStaticState extends StateNotifier<GameInsStatetance> {
GameStaticState() : super(GameInsStatetance());
2023-09-08 21:19:12 +05:30
@override
2023-10-06 16:25:21 +05:30
GameInsStatetance get state => super.state;
2023-09-08 21:19:12 +05:30
2023-10-06 16:25:21 +05:30
void startGame(GameInsStatetance gi) {
2023-09-08 21:19:12 +05:30
state = gi;
}
2023-10-06 16:25:21 +05:30
void doCheckin() {}
2023-09-08 21:19:12 +05:30
2023-10-06 16:25:21 +05:30
void makeGoal() {}
}