Skip to content

Conversation

@Neutrino2711
Copy link
Contributor

Revised comments to clarify that clipping of child depends on clipBehavior of the parent widget, typically scrollable widgets that default to Clips.hard.
Noted that decoration features such as shadows , which render outside the widget boundary, may lead to undesirable effects.
Recommended using Clips.none in scenarios where shadow effects are used to avoid clipping issues.
Fixing Issue #156819

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: scrolling Viewports, list views, slivers, etc. labels Oct 28, 2024
nate-thegrate

This comment was marked as resolved.

@Neutrino2711

This comment was marked as resolved.

@Neutrino2711

This comment was marked as resolved.

@nate-thegrate

This comment was marked as resolved.

@Neutrino2711
Copy link
Contributor Author

19-54-04.mp4

I created this please do review @nate-thegrate

@nate-thegrate
Copy link
Contributor

That looks awesome!

Currently we have a decorated_sliver.0.dart file, which is referenced in the documentation:

/// {@tool dartpad}
/// This sample shows a radial gradient that draws a moon on a night sky:
///
/// ** See code in examples/api/lib/widgets/sliver/decorated_sliver.0.dart **
/// {@end-tool}

Would you be able to add a decorated_sliver.1.dart file with this example, and reference it here too?

@Neutrino2711
Copy link
Contributor Author

Neutrino2711 commented Oct 31, 2024

Thanks for the review. Yes I will be doing that.

@github-actions github-actions bot added d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos labels Oct 31, 2024
Copy link
Contributor

@nate-thegrate nate-thegrate left a comment

Choose a reason for hiding this comment

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

Love this example, especially the color scheme you chose!

I have a lot of suggestions; most of which are whitespace-related.


One other thing that needs to be done: create a decorated_sliver.1_test.dart file based on decorated_sliver.0_test.dart, and add maybe 1 or 2 simple tests.

@Neutrino2711
Copy link
Contributor Author

Neutrino2711 commented Nov 1, 2024

I have a query why decorated_sliver.0.dart is imported like this "import 'package:flutter_api_samples/widgets/sliver/decorated_sliver.0.dart' as example;" in decorated_sliver.0_test.dart file can I import it like this
"import 'package:flutter/examples/api/lib/widgets/sliver/decorated_sliver.0.dart"

Copy link
Contributor

@nate-thegrate nate-thegrate left a comment

Choose a reason for hiding this comment

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

Thanks for the update!

I believe this should be the last round of suggestions, though the autoformatter might make some of the whitespace changes difficult to perform.

You could get around this by committing via the GitHub site:

  • head over to the files tab
  • click Add suggestion to batch for all of them
  • then there will be a button to commit the batch at the top of the screen

Co-authored-by: Nate Wilson <nathan.wilson1232@gmail.com>
@Neutrino2711
Copy link
Contributor Author

@nate-thegrate Thank you for your guidance.

Copy link
Contributor

@nate-thegrate nate-thegrate left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the contribution!

There were just a few analysis problems I missed previously, so go ahead and apply the suggestions when you get a chance. Then we'll be able to merge once the PR has 2 approvals.


There's a wiki page that goes over how to set up your IDE so these linter rules are active while you're editing the file; feel free to check it out when you have a chance!

Co-authored-by: Nate Wilson <nathan.wilson1232@gmail.com>
@nate-thegrate
Copy link
Contributor

I have a query why decorated_sliver.0.dart is imported like this "import 'package:flutter_api_samples/widgets/sliver/decorated_sliver.0.dart' as example;" in decorated_sliver.0_test.dart file can I import it like this "import 'package:flutter/examples/api/lib/widgets/sliver/decorated_sliver.0.dart"

Oh, forgot to answer your question, sorry! Specifying a namespace this way makes it easy to tell which classes are from the example and which ones aren't, and it's a convention followed consistently throughout example test files.

@Neutrino2711
Copy link
Contributor Author

@nate-thegrate one last help how can I ask for review or how does it work I am new to this.

@nate-thegrate
Copy link
Contributor

Sure, no prob!

The Tree Hygiene wiki page has some info on this:

PRs are assigned reviewers weekly. The precise process varies by team but tends to be combined with issue triage.


The next team-framework triage is tomorrow, so we'll figure out a second reviewer then :)

@chunhtai chunhtai self-requested a review November 5, 2024 23:13
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM, just one nitpicking

Neutrino2711 and others added 2 commits November 14, 2024 01:28
Co-authored-by: chunhtai <47866232+chunhtai@users.noreply.github.com>
activeColor: Colors.pink,
onChanged: (bool value) {
setState(() {
isClipped = value;
Copy link
Contributor

Choose a reason for hiding this comment

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

All reference will need to be changed too

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 14, 2024
@auto-submit auto-submit bot merged commit 4b818b5 into flutter:master Nov 14, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 14, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 15, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Nov 15, 2024
Roll Flutter from ed553d1 to 0e2d55e (40 revisions)

flutter/flutter@ed553d1...0e2d55e

2024-11-15 engine-flutter-autoroll@skia.org Roll Packages from b9ac917 to b164be3 (4 revisions) (flutter/flutter#158986)
2024-11-15 magder@google.com Label PRs with gradle and Android paths "platform-android" (flutter/flutter#158970)
2024-11-15 kustermann@google.com Fix code asset copying logic in native asset code (flutter/flutter#158984)
2024-11-15 kustermann@google.com Fix duplicate work in native assets release builds (flutter/flutter#158980)
2024-11-15 matanlurey@users.noreply.github.com Stop generate both `.kts` and non-`.kts` gradle files for a test project. (flutter/flutter#158965)
2024-11-15 matanlurey@users.noreply.github.com Further skip `native_assets_test`(s) that runs `flutter build apk`. (flutter/flutter#158966)
2024-11-15 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 4.2.1 to 4.2.2 (flutter/flutter#157473)
2024-11-15 matanlurey@users.noreply.github.com Try running historically flaky tests first to make `flutter build apk` health tests time out more often? (flutter/flutter#158967)
2024-11-15 bkonyi@google.com [ tool ] Don't throw StateError when DDS fails to start (flutter/flutter#158744)
2024-11-14 katelovett@google.com Create merge_queue.md (flutter/flutter#158959)
2024-11-14 fluttergithubbot@gmail.com Marks Mac_x64 hot_mode_dev_cycle_macos_target__benchmark to be flaky (flutter/flutter#158569)
2024-11-14 fluttergithubbot@gmail.com Marks Mac_arm64 mac_desktop_impeller to be unflaky (flutter/flutter#158564)
2024-11-14 gengesa@gmail.com [gen_l10n] When localizing a message, prefer placeholder definitions defined by the current locale rather than the template locale (flutter/flutter#153459)
2024-11-14 august.oberhauser@swissinfo.ch feat: Include web 1.x.x in plugin template (flutter/flutter#156947)
2024-11-14 andrewrkolos@gmail.com hide members where possible (flutter/flutter#158492)
2024-11-14 andrewrkolos@gmail.com Move platform-specific log-reading implementation details from `ResidentRunner`/`FlutterDevice` to `DeviceLogReader` implementations (flutter/flutter#156181)
2024-11-14 98221114+Neutrino2711@users.noreply.github.com Updated document to clarify Clip Behaviour (flutter/flutter#157719)
2024-11-14 bkonyi@google.com Enable --verbose for android_plugin_skip_unsupported_test tests (flutter/flutter#158933)
2024-11-14 engine-flutter-autoroll@skia.org Roll Packages from 26e123a to b9ac917 (5 revisions) (flutter/flutter#158938)
2024-11-14 43054281+camsim99@users.noreply.github.com Add `dev_dependency` attribute to plugins in `.flutter-plugins-dependencies` (flutter/flutter#158009)
2024-11-14 matanlurey@users.noreply.github.com No longer pass `--verbose` to implicit `pub` calls when `flutter --verbose` is set. (flutter/flutter#158898)
2024-11-14 stuartmorgan@google.com Update triage flow chart for SVG packages (flutter/flutter#158670)
2024-11-14 bruno.leroux@gmail.com Add one MenuAnchor alignment test (flutter/flutter#158915)
2024-11-14 32538273+ValentinVignal@users.noreply.github.com Reland Add test for dynamic_content_color.0.dart (flutter/flutter#158547)
2024-11-14 engine-flutter-autoroll@skia.org Roll Flutter Engine from e97b148e796d to 619804c0fbb7 (1 revision) (flutter/flutter#158905)
2024-11-14 engine-flutter-autoroll@skia.org Roll Flutter Engine from 82940a9aa714 to e97b148e796d (1 revision) (flutter/flutter#158901)
2024-11-14 matanlurey@users.noreply.github.com Move explicit package dependencies to a feature flag (flutter/flutter#158016)
2024-11-14 matanlurey@users.noreply.github.com Try with `bringup: true` debugging why `flutter build apk` often times out. (flutter/flutter#158895)
2024-11-14 rexios@rexios.dev Add constraint options to `SearchAnchor` suggestions builder (flutter/flutter#148856)
2024-11-14 50643541+Mairramer@users.noreply.github.com Adjusts the Hindi TimeOfDayFormat to display in a LTR orientation in localizations. (flutter/flutter#157998)
2024-11-14 38378650+hgraceb@users.noreply.github.com Fix update order of SliverAppBar (flutter/flutter#158159)
2024-11-13 42980667+srivats22@users.noreply.github.com #154792 - CupertinoActionSheetAction cursor doesn't change to clickable on desktop (flutter/flutter#158470)
2024-11-13 58190796+MitchellGoodwin@users.noreply.github.com Adds a skip message for analyzer (flutter/flutter#158890)
2024-11-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Marks Mac_arm64_ios hot_mode_dev_cycle_ios__benchmark to be flaky (#158242)" (flutter/flutter#158891)
2024-11-13 737941+loic-sharma@users.noreply.github.com [SwiftPM] Move the logic for SwiftPM enablement to the platform project (flutter/flutter#158213)
2024-11-13 matanlurey@users.noreply.github.com Temporarily skip flutter build apk for native_assets tests. (flutter/flutter#158880)
2024-11-13 me@alestiago.com docs: include Human Interface haptic information in HapticFeedback (flutter/flutter#158587)
2024-11-13 engine-flutter-autoroll@skia.org Roll Flutter Engine from db3e5af2ca22 to 82940a9aa714 (2 revisions) (flutter/flutter#158799)
2024-11-13 matanlurey@users.noreply.github.com Stream the output of `flutter build` for debugging. (flutter/flutter#158757)
2024-11-13 nate.w5687@gmail.com "Fix failing checks" wiki page for new contributors (flutter/flutter#154629)

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 dit@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.
...
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants