-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Add sample code for SliverAppBar #125785
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
Add sample code for SliverAppBar #125785
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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.
Hi @Istiak-Ahmed78! Welcome, thanks for contributing. :)
Can you sign the CLA so we can review this PR? Also, it looks like there are some analysis failures here.
Hi @Piinks ! It's logging in automatically with my another email address (aistiak6@gmail.com) instead my github email address (aistiak2078@gmail.com) from where I submitted this PR, and I can't change the logged in email address to get the License Agreement. Is there any support or doc that can help me? |
Hello @Istiak-Ahmed78, I was also facing the same problem. I just tried to access the cla site with another browser that I hadn't linked any Google account to before, so I was prompted to sign in. |
Hello @Piinks , can you please check again? I signed CLA. |
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.
Looks like the CLA is all set, thank you!
Can you fix the analysis failure? It looks like there is some whitespace:
/b/s/w/ir/x/w/Á flutter sdk/packages/flutter/lib/src/material/app_bar.dart:1406: trailing U+0020 space character
/b/s/w/ir/x/w/Á flutter sdk/packages/flutter/lib/src/material/app_bar.dart:1410: trailing U+0020 space character
SliverAppBar( | ||
stretch: _stretch, | ||
onStretchTrigger: () async { | ||
// Triggers when stretching |
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.
When stretching to the extent of stretchTriggerOffset
, this would be nice to clarify or add to the sample.
@Piinks, thanks for you suggestions. |
@Piinks , I would be so happy if you review it again please. |
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.
auto label is removed for flutter/flutter, pr: 125785, due to This PR has not met approval requirements for merging. You have project association NONE and need 1 more review(s) in order to merge this PR.
|
auto label is removed for flutter/flutter, pr: 125785, due to Validations Fail. |
Oh right, let me find a second reviewer for this. :) |
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.
LGTM with nits 👍
Thanks for making the docs better!
/// ** See code in examples/api/lib/material/app_bar/sliver_app_bar.4.dart ** | ||
/// {@end-tool} | ||
/// | ||
/// |
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.
Only one empty line is needed here.
|
||
import 'package:flutter/material.dart'; | ||
|
||
/// Flutter code sample for [SliverAppBar]. |
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.
/// Flutter code sample for [SliverAppBar]. | |
/// Flutter code sample for [SliverAppBar] using [stretch] and [onStretchTrigger]. |
Manual roll Flutter from 0b65723 to 43ac23b (30 revisions) Manual roll requested by tarrinneal@google.com flutter/flutter@0b65723...43ac23b 2023-05-05 kevmoo@users.noreply.github.com targets/web.dart - fix typo (flutter/flutter#126114) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6b467df16e11 to 758cbadfac1f (2 revisions) (flutter/flutter#126175) 2023-05-05 44755140+werainkhatri@users.noreply.github.com add tests for dominant bottom sheet in scaffold (flutter/flutter#124472) 2023-05-05 98486346+lindsaypj@users.noreply.github.com Added CupertinoDatepicker monthYear mode (flutter#93508) (flutter/flutter#125603) 2023-05-05 36861262+QuncCccccc@users.noreply.github.com Add `Switch.trackOutlineWidth` property (flutter/flutter#125848) 2023-05-05 47866232+chunhtai@users.noreply.github.com Rename iosdeeplinksettings to iosuniversallinksettings (flutter/flutter#126173) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from f3efe11f4449 to 6b467df16e11 (3 revisions) (flutter/flutter#126174) 2023-05-05 49291509+albertoazinar@users.noreply.github.com improvement : removed required kotlin dependency (flutter/flutter#125002) 2023-05-05 b7woreo@gmail.com Fix incorrect assert hint in flutter.groovy (flutter/flutter#125283) 2023-05-05 102626803+drewroengoogle@users.noreply.github.com Update .cirrus.yml (flutter/flutter#126166) 2023-05-05 kevmoo@users.noreply.github.com tool: replace top-level functions with enum properties (flutter/flutter#126167) 2023-05-05 jacksongardner@google.com Use direct dart API from `dart:ui_web` rather than JS shim. (flutter/flutter#123443) 2023-05-05 68919043+Istiak-Ahmed78@users.noreply.github.com Add sample code for SliverAppBar (flutter/flutter#125785) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from cef0e9d1a94f to f3efe11f4449 (3 revisions) (flutter/flutter#126163) 2023-05-05 leroux_bruno@yahoo.fr Add a ReorderableListView example with cards + cleanup existing tests (flutter/flutter#126155) 2023-05-05 engine-flutter-autoroll@skia.org Roll Packages from 6bd59cd to a0f8fd8 (4 revisions) (flutter/flutter#126161) 2023-05-05 102626803+drewroengoogle@users.noreply.github.com Bring back the failing build_test's (flutter/flutter#126014) 2023-05-05 mdebbar@google.com [web] Use plain platform views in benchmarks (flutter/flutter#126080) 2023-05-05 tessertaha@gmail.com Fix Material 3 tab indicator weight and position (flutter/flutter#125883) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from b0f53e7751ad to cef0e9d1a94f (1 revision) (flutter/flutter#126150) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6f26066144fb to b0f53e7751ad (2 revisions) (flutter/flutter#126148) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 764991e046c6 to 6f26066144fb (1 revision) (flutter/flutter#126141) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from e7cd29153aa9 to 764991e046c6 (1 revision) (flutter/flutter#126137) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from a885ed472eea to e7cd29153aa9 (1 revision) (flutter/flutter#126135) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from c97a0deccbc1 to a885ed472eea (1 revision) (flutter/flutter#126129) 2023-05-05 pateltirth454@gmail.com [NavigationDrawer] adds padding property in NavigationDrawer Widget (flutter/flutter#123961) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 269ce2deebeb to c97a0deccbc1 (1 revision) (flutter/flutter#126124) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4d5070672859 to 269ce2deebeb (16 revisions) (flutter/flutter#126115) 2023-05-05 ian@hixie.ch Minor fixes found while working on blankcanvas (flutter/flutter#125751) 2023-05-05 kevmoo@users.noreply.github.com tool-web: use ProcessUtil.run to invoke child processes (flutter/flutter#126109) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC rmistry@google.com,stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md ...
) Manual roll Flutter from 0b65723 to 43ac23b (30 revisions) Manual roll requested by tarrinneal@google.com flutter/flutter@0b65723...43ac23b 2023-05-05 kevmoo@users.noreply.github.com targets/web.dart - fix typo (flutter/flutter#126114) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6b467df16e11 to 758cbadfac1f (2 revisions) (flutter/flutter#126175) 2023-05-05 44755140+werainkhatri@users.noreply.github.com add tests for dominant bottom sheet in scaffold (flutter/flutter#124472) 2023-05-05 98486346+lindsaypj@users.noreply.github.com Added CupertinoDatepicker monthYear mode (flutter#93508) (flutter/flutter#125603) 2023-05-05 36861262+QuncCccccc@users.noreply.github.com Add `Switch.trackOutlineWidth` property (flutter/flutter#125848) 2023-05-05 47866232+chunhtai@users.noreply.github.com Rename iosdeeplinksettings to iosuniversallinksettings (flutter/flutter#126173) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from f3efe11f4449 to 6b467df16e11 (3 revisions) (flutter/flutter#126174) 2023-05-05 49291509+albertoazinar@users.noreply.github.com improvement : removed required kotlin dependency (flutter/flutter#125002) 2023-05-05 b7woreo@gmail.com Fix incorrect assert hint in flutter.groovy (flutter/flutter#125283) 2023-05-05 102626803+drewroengoogle@users.noreply.github.com Update .cirrus.yml (flutter/flutter#126166) 2023-05-05 kevmoo@users.noreply.github.com tool: replace top-level functions with enum properties (flutter/flutter#126167) 2023-05-05 jacksongardner@google.com Use direct dart API from `dart:ui_web` rather than JS shim. (flutter/flutter#123443) 2023-05-05 68919043+Istiak-Ahmed78@users.noreply.github.com Add sample code for SliverAppBar (flutter/flutter#125785) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from cef0e9d1a94f to f3efe11f4449 (3 revisions) (flutter/flutter#126163) 2023-05-05 leroux_bruno@yahoo.fr Add a ReorderableListView example with cards + cleanup existing tests (flutter/flutter#126155) 2023-05-05 engine-flutter-autoroll@skia.org Roll Packages from 6bd59cd to a0f8fd8 (4 revisions) (flutter/flutter#126161) 2023-05-05 102626803+drewroengoogle@users.noreply.github.com Bring back the failing build_test's (flutter/flutter#126014) 2023-05-05 mdebbar@google.com [web] Use plain platform views in benchmarks (flutter/flutter#126080) 2023-05-05 tessertaha@gmail.com Fix Material 3 tab indicator weight and position (flutter/flutter#125883) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from b0f53e7751ad to cef0e9d1a94f (1 revision) (flutter/flutter#126150) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6f26066144fb to b0f53e7751ad (2 revisions) (flutter/flutter#126148) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 764991e046c6 to 6f26066144fb (1 revision) (flutter/flutter#126141) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from e7cd29153aa9 to 764991e046c6 (1 revision) (flutter/flutter#126137) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from a885ed472eea to e7cd29153aa9 (1 revision) (flutter/flutter#126135) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from c97a0deccbc1 to a885ed472eea (1 revision) (flutter/flutter#126129) 2023-05-05 pateltirth454@gmail.com [NavigationDrawer] adds padding property in NavigationDrawer Widget (flutter/flutter#123961) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 269ce2deebeb to c97a0deccbc1 (1 revision) (flutter/flutter#126124) 2023-05-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4d5070672859 to 269ce2deebeb (16 revisions) (flutter/flutter#126115) 2023-05-05 ian@hixie.ch Minor fixes found while working on blankcanvas (flutter/flutter#125751) 2023-05-05 kevmoo@users.noreply.github.com tool-web: use ProcessUtil.run to invoke child processes (flutter/flutter#126109) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC rmistry@google.com,stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md ...
This PR adds an another example for SliverAppBar, showing the use of stretch and onStretchTrigger
Screenrecorder-2023-05-01-12-54-00-483.mp4
Fixes #125651
Adds sample code for SliverAppBar [stretch, onStretchTrigger]
This PR adds an another simple and easily understandable example code for SliverAppBar.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.