Comments (6)
This would be expected if you're telling the router to navigate back to a certain route on click. Can you share some information on how you're doing the navigation between tabs?
from fluro.
Sure. I'm using a tab bar with a MaterialApp in each tab. Here's my build function for my tabview:
@override
Widget build(BuildContext context) {
return new Scaffold(
bottomNavigationBar: new Material(
child: new TabBar(
controller: _tabController,
tabs: <Widget>[
new Tab(icon: new Icon(Icons.accessibility_new), text: 'Practice'),
new Tab(icon: new Icon(Icons.video_library), text: 'Learn'),
new Tab(icon: new Icon(Icons.headset), text: 'Listen'),
new Tab(icon: new Icon(Icons.multiline_chart), text: 'Track'),
],
),
color: Theme.of(context).primaryColor,
),
body: new TabBarView(
controller: _tabController,
children: <Widget>[
new MaterialApp(home: new Practice(), onGenerateRoute: Application.router.generator, theme: Theme.of(context), key: new PageStorageKey('PracticeTab')),
new MaterialApp(home: new Learn(), onGenerateRoute: Application.router.generator, theme: Theme.of(context), key: new PageStorageKey('LearnTab')),
new MaterialApp(home: new Listen(), onGenerateRoute: Application.router.generator, theme: Theme.of(context), key: new PageStorageKey('ListenTab')),
new MaterialApp(home: new Track(), onGenerateRoute: Application.router.generator, theme: Theme.of(context), key: new PageStorageKey('TrackTab')),
],
),
);
}
from fluro.
As you can see from above, the TabBar is managing the navigation between tabs. I don't manage this directly.
from fluro.
Is there a reason you're using a new MaterialApp
instance for each tab. That seems to be a bit odd.
from fluro.
@lukef, no. I've since changed this.
I'm closing this issue as I found a solution. For anyone else looking to do this, check out flutter/flutter#12130.
from fluro.
@smkhalsa I'm trying to do the same thing and my solution was to nest MaterialApps within a tab navigator as well. However, before I implemented that case I realized there had to be another solution. Which is how I found your referenced thread. Any chance you could explain where you implemented the TabSwitchingView section of the code? I'm at a loss here and just want a hybrid between iOS and Material UX designs.
from fluro.
Related Issues (20)
- navigateTo not finding route
- Define default 404 screen on Unknown route HOT 1
- Update Readme for Null Safety
- Error after refresh page with appended argument. HOT 1
- Arguments is null when using HandlerType.function HOT 1
- All previous view loaded when direct access via url
- Reloaded web page 404 error
- optional params
- notFoundHanler == null
- remove hash from the url HOT 1
- firebase dynamic link doesn't work HOT 7
- A GlobalKey was used multiple times inside one widget's child list. HOT 1
- Expected a value of type 'Handler', but got one of type 'Null' HOT 1
- settingsToUse = settingsToUse.copyWith(name: path); HOT 2
- Flutter web: Refreshing dynamic route opens blank page HOT 1
- I found a very magical bug. When I use fluro to jump, the text element of the page will be copied as red and yellow borders. HOT 4
- Error: The argument type 'FluroRouter' can't be assigned to the parameter type 'Router<dynamic>' HOT 1
- Build error HOT 2
- BuildContext null for HandlerType.function HOT 1
- initialRoute with string like '/home/login' will cause not found error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluro.