mo-ah-dawood / ready

32 stars 9 forks source link

Can we Navigate within the right box , and Keep Drawer Stick There #1

Closed rohitsangwan01 closed 2 years ago

rohitsangwan01 commented 2 years ago

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??

mo-ah-dawood commented 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

rohitsangwan01 commented 2 years ago

@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

mo-ah-dawood commented 2 years ago

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

         DashboardItem(
            builder: () {
             return InnerNavigator(
                builder: (BuildContext context) {
                  return YourPage();
                },
              );
            },
            icon: const Icon(Icons.animation),
            id: 'item_id',
            label: 'Item label',
           )
rohitsangwan01 commented 2 years ago

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

mo-ah-dawood commented 2 years ago

i will try to add this feature in the future