Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Defer load demos #423

Merged
merged 34 commits into from
Feb 9, 2021
Merged

Defer load demos #423

merged 34 commits into from
Feb 9, 2021

Conversation

ferhatb
Copy link
Contributor

@ferhatb ferhatb commented Feb 5, 2021

This drops release binary size from 4,936,531 to 4,125,088.

Copy link
Contributor

@rami-a rami-a left a comment

Choose a reason for hiding this comment

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

LGTM with just a few comments

@@ -86,7 +86,7 @@ class HomePage extends StatelessWidget {
package: 'flutter_gallery_assets',
),
assetDarkColor: const Color(0xFF253538),
studyRoute: RallyApp.loginRoute,
studyRoute: rally_routes.loginRoute,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why the Shrine and StarterApp routes aren't changed to do the same as the other studies?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -1118,6 +1118,41 @@ double _carouselHeight(double scaleFactor, BuildContext context) => math.max(
scaleFactor,
_carouselHeightMin);

typedef LibraryLoader = Future<void> Function();
Copy link
Contributor

Choose a reason for hiding this comment

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

It might make more sense for the LibraryLoader and DeferredWidget to be moved into its own dart file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thx for suggestion. Moved to deferred_widget.dart

@@ -0,0 +1 @@
const String defaultRoute = '/crane';
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: needs new line at end of file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -0,0 +1 @@
const String defaultRoute = '/fortnightly';
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: needs new line at end of file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -0,0 +1,2 @@
const String loginRoute = '/rally/login';
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the route consts for all the studies just be in one file instead of multiple?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Torn on this one. I like that they are pretty independent. the demo types are breaking that right now, maybe those should be split too.

@rami-a
Copy link
Contributor

rami-a commented Feb 5, 2021

The flutter gallery unit tests check is failing due to a problem with web_benchmarks that we haven't been able to resolve yet. @ferhatb any thoughts?

cc @pennzht

@@ -0,0 +1,2 @@
const String loginRoute = '/shrine/login';
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this file is missing copyright header

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

@rami-a rami-a left a comment

Choose a reason for hiding this comment

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

LGTM with one comment

@@ -86,7 +86,7 @@ class HomePage extends StatelessWidget {
package: 'flutter_gallery_assets',
),
assetDarkColor: const Color(0xFF253538),
studyRoute: RallyApp.loginRoute,
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like the Shrine and Starter app are not using the new routes files you added yet

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@ferhatb ferhatb merged commit 48a9d6b into flutter:master Feb 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants