-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EPIC] Feat: Dynamic Navigation Menu #4
Comments
Alright. After I finish the work done in dwyl/calendar#25, I'll pick this up. So if there's no internet, will the user not be able to use the navigation menu? What caching strategy would you recommend? I know this is forward-looking but I'm just hoping to clarify this beforehand. |
Thanks for confirming there is enough info in here to get going. 👌 For now, we just need to confirm that it's possible for the I'm always glad to see proactive questions. 🎉 But again, for now, we just want to confirm that we can dynamically create the Navigation Drawer. 👌 |
As I'm reading through this, I need some clarifications on some points because I feel like the original description lacks specificity and there aren't any Figma wireframes to go for:
I've taken a look at https://github.com/nickyrabit/NavigationDrawer-with-Dynamic-Menu-and-Submenu-using-Flutter-Pageview and although it certainly is useful, it's just conditional rendering based on the person's permissions. That is, it just shows and hides specific page routes according to what a user can or cannot do. What you seem to be asking is to create new pages on the fly (for this we would need a template - but even then, what are these new pages pertaining to? Seems a lot like Notion). But I'm not sure if that's even possible. The only thing remotely close I found was https://stackoverflow.com/questions/63857496/how-to-add-tabs-dynamically-to-tabbar-in-flutter but it just pertains to
I know we can pop and push named routes like we do with Perhaps I'm overcomplicating things... or outright interpreting what you're saying wrong 😅 |
Stumbled upon https://stackoverflow.com/questions/75234251/how-to-implement-a-flutter-drawer-menu-submenu-feature-where-menu-submenu-render but it's a dead-end. Just for future notice. |
@LuchoTurtle thank you for seeking further clarification. 🎉 You are definitely over-complicating things. Here is a good example of a Dynamic Nav Drawer in a Native iOS App: The question you are trying to answer is: How do they achieve this? |
In the Gmail Scenario, I created a new label on my Desktop (using the GMail Web interface in Google Chrome) |
Thank you for replying. Hence why I was wondering about "creating pages on the fly" - what pages are they redirecting to? I'm using page and screen interchangeably. In Flutter I would need to know where I'm navigating into. But, as you've said, that's Level 2. The example you've shown with Gmail is simply filtering e-mails by the label. I understand what you've said that you want to create new menu items and render them accordingly and be shown on all devices - no recompilation needed. I was just looking into more clarification of what these menu items referred to and their purpose. Nonetheless, I'm now more certain about what I need to work out. The rest of the requirements (for example, changing text colour) can be fleshed out at a later stage. Thanks 👍 |
I've been and am currently working on getting nested tiles with |
Modals 🤢 |
Yeah, |
As for where the menu items in the Nav will "link to" they will simply take the person to another screen. |
@LuchoTurtle as discussed in our in-person standup today, |
Understood. If you want such implementation, you can visit the state of the repo on the commit https://github.com/dwyl/flutter-navigation-menu-demo/tree/d1383a5e1e3271de6f409f844fe34f33cb9f3685. However, similarly to what happens with Gmail, user labels do not get translated. What we want is:
|
Having a bit of trouble getting the tests to run correctly after making changes with Future loadLanguage() async {
final path = 'assets/i18n/${_locale.languageCode}.json';
String jsonStringValues = await rootBundle.loadString(path); // breaks here Apparently, there are constraints accessing Adding |
After reading https://stackoverflow.com/questions/60079645/flutter-how-to-mock-a-call-to-rootbundle-loadstring-then-reset-the-mocked, it seems that almost all tests pass... By setting |
To facilitate having an arbitrary number of
lists
,we need to investigate how to dynamically update the Navigation Menu in a
Flutter
App.Requirements / Roadmap:
MUST
allownew
menu items to be added/removed by theperson
MUST NOT
require re-compiling/re-releasing theFlutter
App.SHOULD
allow theperson
to re-order the Nav Menu Items manually.SHOULD
supportemoji
,icons
orimages
(GIF
,JPEG
,PNG
&SVG
up to64x64px
)SHOULD
allow selection oftext color
SHOULD
allow for sub-menus up to 3 levels. e.g:SHOULD
be fullyi18n
compatible so can be translated seamlessly. see: Feat:i18n
inFlutter
learn-flutter#90Todo
The first thing we need to is:
T4h
] ifNav Menu
be dynamically generated 🔍e.g: based on
JSON
returned by a server response (and cached on the device).if
you can get something working onlocalhost
, 🧑💻PR
extending this demo to include dynamic menu items. 🚀The text was updated successfully, but these errors were encountered: