Skip to content

Conversation

@chunhtai
Copy link
Owner

@chunhtai chunhtai commented Jul 9, 2020

Description

Stocks app rewrite using router widget

router pr flutter#60299

Related Issues

flutter#45938

Tests

I added the following tests:

Replace this with a list of the tests that you added as part of this PR. A change in behaviour with no test covering it
will likely get reverted accidentally sooner or later. PRs must include tests for all changed/updated/fixed behaviors. See Test Coverage.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change. If not, delete the remainder of this section.
    • I wrote a design doc: https://flutter.dev/go/template Replace this with a link to your design doc's short link
    • I got input from the developer relations team, specifically from: Replace with the names of who gave advice
    • I wrote a migration guide: Replace with a link to your migration guide

Copy link

Choose a reason for hiding this comment

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

trivial nit: indent issue

Copy link

Choose a reason for hiding this comment

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

nit:style guide says to only give library when there's docs

Copy link

Choose a reason for hiding this comment

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

nit: indenting

Choose a reason for hiding this comment

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

indentation

Choose a reason for hiding this comment

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

nit: indentation

Choose a reason for hiding this comment

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

this import shouldn't be necessary?

Choose a reason for hiding this comment

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

indentation

Choose a reason for hiding this comment

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

nit: blank line

Comment on lines 152 to 150

Choose a reason for hiding this comment

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

Suggested change
} else {
if (syntheticUrl.path == '/stock') {
final String symbol = syntheticUrl.queryParameters['symbol'];
if (symbol != null && symbol.isNotEmpty)
return SynchronousFuture<StockRoutePath>(StockSymbolPath(symbol));
}
return SynchronousFuture<StockRoutePath>(const StockHomePath());
}
}
if (syntheticUrl.path == '/stock') {
final String symbol = syntheticUrl.queryParameters['symbol'];
if (symbol != null && symbol.isNotEmpty)
return SynchronousFuture<StockRoutePath>(StockSymbolPath(symbol));
}
return SynchronousFuture<StockRoutePath>(const StockHomePath());

Choose a reason for hiding this comment

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

maybe define these strings as const on the class to reuse them here and in the method below?

Choose a reason for hiding this comment

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

What does null mean? Should there be an assert because configuration is always one of the options?

Choose a reason for hiding this comment

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

indentation

Comment on lines 197 to 198

Choose a reason for hiding this comment

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

merge into one if?

@chunhtai chunhtai force-pushed the nav-refactor-router-alone branch from da0c469 to 512f2d9 Compare July 17, 2020 23:11

Choose a reason for hiding this comment

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

typo: opened

@chunhtai chunhtai force-pushed the nav-refactor-router-alone branch 9 times, most recently from e3f6b1f to 698bc81 Compare August 3, 2020 21:56
@chunhtai chunhtai force-pushed the nav-refactor-router-alone branch 8 times, most recently from 9a2d2fd to 0b113e9 Compare August 7, 2020 21:17
@chunhtai chunhtai force-pushed the nav-refactor-stock branch from 5439a6c to 139c18f Compare August 7, 2020 22:02
@chunhtai chunhtai closed this Aug 10, 2020
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.

5 participants