Skip to content

Commit 7e2d392

Browse files
handle deleting instances
1 parent 31ca44e commit 7e2d392

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

lib/features/sorting/shell/view/shell_sort_page.dart

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,14 @@ final _notifierProvider = StateNotifierProvider<SortingNotifier, SortingNotifier
99
(ref) => ShellSortNotifier(),
1010
);
1111

12-
class ShellSortPage extends ConsumerStatefulWidget {
12+
class ShellSortPage extends StatefulWidget {
1313
const ShellSortPage({super.key});
1414

1515
@override
16-
ConsumerState<ShellSortPage> createState() => _ShellSortPageState();
16+
State<ShellSortPage> createState() => _ShellSortPageState();
1717
}
1818

19-
class _ShellSortPageState extends ConsumerState<ShellSortPage> {
20-
@override
21-
void deactivate() {
22-
ref.invalidate(_notifierProvider); // deletes current instance and resets
23-
super.deactivate();
24-
}
25-
19+
class _ShellSortPageState extends State<ShellSortPage> {
2620
@override
2721
Widget build(BuildContext context) {
2822
return SortingPage(instance: _notifierProvider, title: StringsManager.shellSort);

0 commit comments

Comments
 (0)