Skip to content

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

Merged
merged 20 commits into from
Mar 3, 2020
Merged

add web_dashboard API #333

merged 20 commits into from
Mar 3, 2020

Conversation

johnpryan
Copy link
Contributor

This is the latest version of the web_dashboard sample. Replaces #306

Copy link
Contributor

@RedBrogdon RedBrogdon left a 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
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(gentle ping)

Copy link
Contributor Author

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() {
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(gentle ping)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(gentle ping)

Copy link
Contributor Author

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;
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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) {
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@johnpryan
Copy link
Contributor Author

@RedBrogdon ready for another look

@johnpryan johnpryan merged commit edf2193 into flutter:master Mar 3, 2020
@johnpryan johnpryan deleted the web_dashboard2 branch April 13, 2020 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants