Skip to content

Commit

Permalink
refactor search provider
Browse files Browse the repository at this point in the history
  • Loading branch information
GravityDarkLab committed Feb 3, 2024
1 parent 726cdbe commit 36fee62
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class App extends ConsumerWidget {
Connectivity().checkConnectivity().then((connectivityResult) {
if (connectivityResult == ConnectivityResult.none) {
WidgetsBinding.instance.addPostFrameCallback((_) {
Navigator.of(context).pushReplacementNamed('/downloads');
Navigator.of(context).pushNamed('/downloads');
});
}
});
Expand Down
3 changes: 3 additions & 0 deletions lib/providers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@ final progressProvider = FutureProvider.autoDispose.family<Progress, int>(
return videoViewModel.fetchProgressForStream(streamId);
},
);

final isSearchActiveProvider = StateProvider<bool>((ref) => false);

2 changes: 1 addition & 1 deletion lib/views/components/custom_search_top_nav_bar.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:gocast_mobile/providers.dart';
import 'package:gocast_mobile/views/components/filter_popup_menu_button.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';

Expand Down Expand Up @@ -118,4 +119,3 @@ class CustomSearchTopNavBar extends ConsumerWidget
Size get preferredSize => const Size.fromHeight(50);
}

final isSearchActiveProvider = StateProvider<bool>((ref) => false);

0 comments on commit 36fee62

Please sign in to comment.