Repository navigation
Make TabBarSelection a widget - #1007
Conversation
There was a problem hiding this comment.
I think I'd call this just "page wrapper builder" or something. There's nothing actually tab-specific about it.
There was a problem hiding this comment.
Sure, I'll change that. At some point I think it would be worth revisiting the WidgetDemo and GalleryPage types. They don't work well for demoing tabs, toolbars, etc.
e666199 to
29bd89c
Compare
|
TabBarSelection no longer creates an InheritedWidget. Descendants now add themselves as performance listeners with TabBarSelection.registerPerformanceListener() and remove themselves with TabBarSelection.unregisterPerformanceListener(). If the TabBarSelection is deactivated, the listeners are automatically unregistered and the listener's handleDeactivate() method is called. |
There was a problem hiding this comment.
since classes can't extend this one (they can only implement it) I think we should make the functions abstract (replace the bodies with just a semicolon). Should be a no-op in principle.
There was a problem hiding this comment.
hm actually I guess using with like you do it, they could. I think I'd still go with 'implements', but your call.
|
LGTM, but if you don't add tests here we should at least file a bug for adding tests. And definitely file a bug about the insertion case if you don't test it and/or fix it. |
e06dae7 to
6178fdf
Compare
Make TabBarSelection a widget TabBarSelection is now expected to be an ancestor of its TabBar and TabBarView.
TabBarSelection is now expected to be an ancestor of its TabBar and TabBarView.