Skip to content

Conversation

@filiph
Copy link
Contributor

@filiph filiph commented May 28, 2021

Fixes #76379.
Fixes #84150.

This is another stab at landing #76519, which was closed in March. The code is nearly identical, except:

The following is a direct copypaste from #76519, which was authored by @brianegan:


Summary

I've worked with @filiph to develop a new template application that includes two features: A static list / detail feature and a dynamic settings feature. When a user changes the Theme in the settings screen, the application responds in kind.

The template takes the following notable approaches. Reasons behind each feature / approach is documented in the "New Flutter Template: Final Decisions" document.

  • The template targets Intermediate Flutter developers. "Intermediate Flutter Developer" is defined by the "Flutter Learning Journey's" document.
  • Generally follows the Simple App State Management guide, using a ChangeNotifier to coordinate multiple Widgets.
  • Includes an analysis_options.yaml file
  • Generates localizations by default using arb files.
  • Includes an example image and establishes 1x, 2x and 3x folders for image assets.
  • Uses a "feature-first" folder organization
  • Navigator 1.0 with pushNamed for Navigation

Approach

  1. Spent one week on research and competitive analysis. This involved recruiting and interviewing beginner to intermediate Flutter developers to determine their current learning targets and needs. Furthermore, I reviewed popular architecture and state management libraries from the Flutter community to determine the current advice and best practices offered by the Flutter ecosystem. Finally, I researched templates from "competing" frameworks, such as Android, iOS, Xamarin, React and Angular to see what similar frameworks offer in regards to templates. This research has been compiled into the "New Flutter Template: Research and Competitive Analysis" Google doc that informed our subsequent work. Please note: This document includes some notes from the user interviews. It does not contain any personally revealing information, but to ensure privacy, I've restricted access to this document.
  2. Next, I spent 3 weeks coding up various approaches. This resulted in the creation of ~25 different potential templates. From these evaluations we learned the different types of decisions we need to make for a final template. For example: What should the template do? Should it include localization? Logging? Responsive Breakpoints? Etc.
  3. We then asked for more community feedback on these decisions. We used this feedback + all of the information gathered in our previous steps to make our final decisions. The decisions we've reached are documented in the "New Flutter Template: Final Decisions" document.
  4. Now, we've taken those decisions and distilled them into this template proposal!

Preview

simplescreenrecorder-2021-02-22_15.27.52.mp4
simplescreenrecorder-2021-02-26_17.11.23.mp4

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard bot added c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels. labels May 28, 2021
@google-cla
Copy link

google-cla bot commented May 28, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label May 28, 2021
@google-cla
Copy link

google-cla bot commented May 28, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@filiph filiph force-pushed the list_detail_app_template_reland branch from b58c525 to a03b20c Compare June 1, 2021 19:00
@google-cla
Copy link

google-cla bot commented Jun 1, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

2 similar comments
@google-cla
Copy link

google-cla bot commented Jun 1, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla
Copy link

google-cla bot commented Jun 1, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@filiph filiph force-pushed the list_detail_app_template_reland branch from 6f89825 to a2f51c6 Compare June 1, 2021 23:16
@google-cla
Copy link

google-cla bot commented Jun 1, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@filiph filiph changed the title [WIP] Add a more complete app template for Flutter (skeleton) Add a more complete app template for Flutter (skeleton) Jun 1, 2021
@filiph
Copy link
Contributor Author

filiph commented Jun 1, 2021

This is ready for re-review. Some notes:

  1. This is an updated version of Proposal: A more complete app template for Flutter #76519, which already got LGTM from @goderbauer, @zanderso, @Hixie, @csells.
  2. Still, I'd like someone to go over the final product, including my changes:
    • The template is now null safe
    • The change is rebased to latest Flutter (~3 months of development)
  3. The change will fail CI until I also land [flutter_template_images] Support the new skeleton app template packages#366. In the original PR, @stuartmorgan asks not to land the flutter/packages change until this one is fully approved and ready to land.

Also, @brianegan, can I ask you to reply @googlebot I consent. here, please?

@google-cla
Copy link

google-cla bot commented Jun 1, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@csells
Copy link
Contributor

csells commented Jun 2, 2021

lgtm

@HansMuller
Copy link
Contributor

Maybe Dummy isn't the best prefix. Stub or proxy might be better.

Copy link
Contributor

Choose a reason for hiding this comment

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

This should end with a period. If the tests didn't catch it, we should update the tests.

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.

Do you know which tests would catch this? I'm unable to run some of the tests locally, and due to the multi-package nature of this change, I can't see all the test results until 1) this CL is approved, 2) I land the flutter/packages change, 3) I re-run this tests on this change.

Copy link
Contributor

Choose a reason for hiding this comment

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

there are a lot fewer comments in this file than in the main template's pubspec.yaml, is that intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is intentional: I thought it's okay since this template is focused on intermediate users who "just want to start an app". But I don't have a strong opinion here, and can easily revert back. Let me know.

Aside: When the comments are back, 95% of the lines in this file are the same as in the main template (we're just actually using assets: here). I was looking at ways to make this DRY, but it would just make bind this new template to create_base.dart with something like withPluginHook.

@google-cla
Copy link

google-cla bot commented Jun 3, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

2 similar comments
@google-cla
Copy link

google-cla bot commented Jun 3, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla
Copy link

google-cla bot commented Jun 3, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@filiph filiph force-pushed the list_detail_app_template_reland branch from 1234086 to 99eb93b Compare June 3, 2021 18:14
@google-cla
Copy link

google-cla bot commented Jun 3, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

1 similar comment
@google-cla
Copy link

google-cla bot commented Jun 3, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

The template LGTM

@google-cla
Copy link

google-cla bot commented Jun 3, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@filiph
Copy link
Contributor Author

filiph commented Jun 3, 2021

Renamed Dummy* to Sample*. Thanks for the naming idea, @Hixie, I really like it.

@filiph filiph force-pushed the list_detail_app_template_reland branch from 9a80722 to 34807d4 Compare June 28, 2021 19:19
@fluttergithubbot fluttergithubbot merged commit 76d5e62 into flutter:master Jun 28, 2021
@filiph filiph deleted the list_detail_app_template_reland branch June 28, 2021 22:30
@frankhasen
Copy link

I would be very happy if the template would implement the Navigator 2.

@Add00w
Copy link

Add00w commented Jul 26, 2022

I would be very happy if the template would implement the Navigator 2.

with bottom navigation too.

@stuartmorgan-g
Copy link
Contributor

This PR has been closed since last year; the place to file new enhancement requests is the issue tracker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run pub get --offline after flutter create A more complete app template for Flutter