-
Notifications
You must be signed in to change notification settings - Fork 7.7k
add web_dashboard API #333
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly nits with a few actual questions. This looks really good. It's great to see tests already in place as you're landing the API stuff, too.
@@ -0,0 +1,17 @@ | |||
# web_dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a line in here specifically telling people not to run the app on mobile or desktop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(gentle ping)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
return item..id = id; | ||
} | ||
|
||
Stream<List<Item>> subscribe() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, in other projects I'm typically see something like:
Stream<List<Item>> get itemStream => _streamController.stream;
Is this a pattern you've seen elsewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(gentle ping)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(gentle ping)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
/// BottomNavigationBar, or NavigationRail, as well as the correct page in the | ||
/// body of the Scaffold. | ||
class AppShell extends StatefulWidget { | ||
final String routeName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this used solely for the initial route when building the navigator later? If so, consider renaming it to initialRouteName
or something similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
considering this fixed since I took this file out.
@@ -0,0 +1,17 @@ | |||
# web_dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(gentle ping)
// order. (Refreshing the browser with the initial route set to | ||
// '/settings' invokes onGenerateRoute with '/' instead of | ||
// '/settings'.) | ||
SchedulerBinding.instance.addPostFrameCallback((dur) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should set aside some time to talk about what you've needed to do here. I have no doubt that you've got the best available pattern, but having something this complicated in one of our samples is a DevRel smell, so to speak, and we should try to effect change to make the API better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed, since this is more of an experiment than a best-practice.
@RedBrogdon ready for another look |
This is the latest version of the web_dashboard sample. Replaces #306