Closed rohitsangwan01 closed 2 years ago
we are not replacing the full page and the old page not disposed at all if open page it keeps its state
can you please capture a video for your issue
@mo-ah-dawood , no i mean page State remains same , what i mean is we are on Dashboard Layout , and its working fine , on Dashbard when we click on a Button to navigate , it will open next page , on the full screen , we can come back to dashboard
but what i want is , when we want to navigate , we can navigate into to same dashboard layout , the next page should open like this
Currently flow is , initial Dashboard Lets say we have this Layout , left hand side Drawer and right side page
Drawer | Dashboard Click a button on Dashboard to naviagte NewPage open
but what is want is Drawer | Dashboard Click a button on Dashboard to naviagte Drawer | NewPage Click a button on NewPage to naviagte Drawer | NextPage
means Responsive layout remains constant Drawer Remain constatnt , and i can navigate within right side box
As i understand you may has this code
return ReadyDashboard(
items: [
DashboardItem(
builder: () {
// return const YourPage();
},
icon: const Icon(Icons.animation),
id: 'item_id',
label: 'Item label',
)
],
);
now in YourPage
you have a button witch navigate to a new screen
but you want to navigate inside YourPage
not the full page
if this is the case just wrap YourPage
with navigator
first create this widget
class InnerNavigator extends StatelessWidget {
final WidgetBuilder builder;
const InnerNavigator({Key? key, required this.builder}) : super(key: key);
@override
Widget build(BuildContext context) {
return Navigator(
initialRoute: "/",
onGenerateRoute: (settings) {
if (settings.name == "/") {
return MaterialPageRoute(builder: builder, settings: settings);
} else {
return UnknownRouteWidget();
}
},
);
}
}
DashboardItem(
builder: () {
return InnerNavigator(
builder: (BuildContext context) {
return YourPage();
},
);
},
icon: const Icon(Icons.animation),
id: 'item_id',
label: 'Item label',
)
ohh i see , am using something similar currently , as i said in my first comment , am using Navigator , but am using with Getx so have to manage bindings and dependency injection with navigation , which makes it a little bit complicated , but works fine, but anyway Thanks for this package , all in one required for an responsive admin panel
i will try to add this feature in the future
Hey , great Package man , but while navigating this dashboard page replaced with full page , can we navigate within the right side box , i know we can achieve something similar with navigator and all , but is it possible within this package??