You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.5 KiB
35 lines
1.5 KiB
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'package:my_flutter_puzzle/application/notifiers/image_splitter_notifier.dart';
|
|
import 'package:my_flutter_puzzle/application/notifiers/login_register_notifier.dart';
|
|
import 'package:my_flutter_puzzle/application/notifiers/puzzle_notifier.dart';
|
|
import 'package:my_flutter_puzzle/application/notifiers/puzzle_type_notifier.dart';
|
|
import 'package:my_flutter_puzzle/application/states/image_splitter_state.dart';
|
|
import 'package:my_flutter_puzzle/application/states/puzzle_state.dart';
|
|
import 'package:my_flutter_puzzle/utils/image_splitter.dart';
|
|
import 'package:my_flutter_puzzle/utils/puzzle_solver.dart';
|
|
|
|
import 'application/notifiers/timer_notifier.dart';
|
|
|
|
final imageSplitterProvider = Provider<ImageSplitter>((ref) => ImageSplitter());
|
|
|
|
final puzzleNotifierProvider = StateNotifierProvider.family<PuzzleNotifier, PuzzleState, PuzzleSolverClient>(
|
|
(ref, solverClient) => PuzzleNotifier(solverClient),
|
|
);
|
|
|
|
final imageSplitterNotifierProvider = StateNotifierProvider<ImageSplitterNotifier, ImageSplitterState>(
|
|
(ref) => ImageSplitterNotifier(
|
|
ref.watch(imageSplitterProvider),
|
|
),
|
|
);
|
|
|
|
final timerNotifierProvider = StateNotifierProvider<TimerNotifier, String>(
|
|
((ref) => TimerNotifier()),
|
|
);
|
|
|
|
final puzzleTypeNotifierProvider = StateNotifierProvider<PuzzleTypeNotifier, PuzzleType>(
|
|
(ref) => PuzzleTypeNotifier(),
|
|
);
|
|
|
|
final isLoginNotifier = StateNotifierProvider<IsLoginNotifier, bool>(
|
|
(ref) => IsLoginNotifier(),
|
|
);
|