mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
fix search action
This commit is contained in:
@@ -27,7 +27,7 @@ class NaviPane extends StatefulWidget {
|
|||||||
required this.paneActions,
|
required this.paneActions,
|
||||||
required this.pageBuilder,
|
required this.pageBuilder,
|
||||||
this.initialPage = 0,
|
this.initialPage = 0,
|
||||||
this.onPageChange,
|
this.onPageChanged,
|
||||||
required this.observer,
|
required this.observer,
|
||||||
required this.navigatorKey,
|
required this.navigatorKey,
|
||||||
super.key});
|
super.key});
|
||||||
@@ -38,7 +38,7 @@ class NaviPane extends StatefulWidget {
|
|||||||
|
|
||||||
final Widget Function(int page) pageBuilder;
|
final Widget Function(int page) pageBuilder;
|
||||||
|
|
||||||
final void Function(int index)? onPageChange;
|
final void Function(int index)? onPageChanged;
|
||||||
|
|
||||||
final int initialPage;
|
final int initialPage;
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ class _NaviPaneState extends State<NaviPane>
|
|||||||
set currentPage(int value) {
|
set currentPage(int value) {
|
||||||
if (value == _currentPage) return;
|
if (value == _currentPage) return;
|
||||||
_currentPage = value;
|
_currentPage = value;
|
||||||
widget.onPageChange?.call(value);
|
widget.onPageChanged?.call(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Function()? mainViewUpdateHandler;
|
void Function()? mainViewUpdateHandler;
|
||||||
|
@@ -78,6 +78,11 @@ class _MainPageState extends State<MainPage> {
|
|||||||
activeIcon: Icons.category,
|
activeIcon: Icons.category,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
onPageChanged: (i) {
|
||||||
|
setState(() {
|
||||||
|
index = i;
|
||||||
|
});
|
||||||
|
},
|
||||||
paneActions: [
|
paneActions: [
|
||||||
if(index != 0)
|
if(index != 0)
|
||||||
PaneActionEntry(
|
PaneActionEntry(
|
||||||
|
Reference in New Issue
Block a user