Add ability to clip Stepper step content#152370
Merged
auto-submit[bot] merged 2 commits intoflutter:masterfrom Jul 31, 2024
TahaTesser:stepper_step_content_clip
Merged
Add ability to clip Stepper step content#152370auto-submit[bot] merged 2 commits intoflutter:masterfrom TahaTesser:stepper_step_content_clip
Stepper step content#152370auto-submit[bot] merged 2 commits intoflutter:masterfrom
TahaTesser:stepper_step_content_clip
Conversation
Piinks
reviewed
Jul 29, 2024
| /// See also: | ||
| /// | ||
| /// * [Clip], which explains how to use this property. | ||
| final Clip? clipBehavior; |
Contributor
Author
There was a problem hiding this comment.
Contributor
Author
There was a problem hiding this comment.
Made it non-nullable and updated tests.
Contributor
There was a problem hiding this comment.
Thanks for the context! Nullable makes total sense to me when we have a theme - TIL! :)
| }); | ||
|
|
||
| // This is a regression test for https://github.com/flutter/flutter/issues/66007. | ||
| testWidgets('Vertical Stepper steps can be clipped', (WidgetTester tester) async { |
Contributor
There was a problem hiding this comment.
Should we write a test for horizontal as well?
Contributor
Author
There was a problem hiding this comment.
It's actually incorrect tittle. Initially I planned to test vertical and horizontal Stepper in two separate tests but it was too simple to split into two tests. Corrected the title. :)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 1, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 1, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 1, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 1, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 1, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 2, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 2, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 2, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 2, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 3, 2024
auto-submit bot
pushed a commit
to flutter/packages
that referenced
this pull request
Aug 3, 2024
Manual roll Flutter from 85960d2 to 4ff9462 (45 revisions) Manual roll requested by [email protected] flutter/flutter@85960d2...4ff9462 2024-08-01 [email protected] Fix local testing, gradle XML errors, and enable on CI. (flutter/flutter#152383) 2024-08-01 [email protected] Fix formatting issues in `search_anchor.0_test.dart` (flutter/flutter#152669) 2024-08-01 [email protected] Add tests for search anchor examples (flutter/flutter#152659) 2024-08-01 [email protected] Roll Flutter Engine from 4dc94d6f88ba to 7c4a44611abe (1 revision) (flutter/flutter#152665) 2024-08-01 [email protected] Roll Flutter Engine from f546fef7d7cd to 4dc94d6f88ba (1 revision) (flutter/flutter#152663) 2024-08-01 [email protected] Roll Flutter Engine from 0fbff219c498 to f546fef7d7cd (2 revisions) (flutter/flutter#152661) 2024-08-01 [email protected] Roll Flutter Engine from 32f788823f43 to 0fbff219c498 (5 revisions) (flutter/flutter#152658) 2024-08-01 [email protected] Manual roll Flutter Engine from 32f788823f43 to ed95b491f260 (3 revisions) (flutter/flutter#152654) 2024-08-01 [email protected] Manual roll Flutter Engine from 16332725788c to 32f788823f43 (11 revisions) (flutter/flutter#152648) 2024-07-31 [email protected] [CupertinoActionSheet] Make `_ActionSheetButtonBackground` stateless (flutter/flutter#152283) 2024-07-31 [email protected] Implementing null-aware logic in `/packages/flutter/` (flutter/flutter#152294) 2024-07-31 [email protected] Reintroduce verbose logging for hot reload flake (flutter/flutter#152639) 2024-07-31 [email protected] [material/menu_anchor.dart] Remove unused early key event listener (flutter/flutter#150915) 2024-07-31 [email protected] Improve `CupertinoCheckbox` fidelity (flutter/flutter#151441) 2024-07-31 [email protected] Update docs to support new Android version (flutter/flutter#152503) 2024-07-31 [email protected] [Android] Update integration test AVD dependency to use Android 35 emulators (flutter/flutter#152498) 2024-07-31 [email protected] Shift + click gesture support for SelectionArea on desktop platforms (flutter/flutter#148574) 2024-07-31 [email protected] Add ability to clip `Stepper` step content (flutter/flutter#152370) 2024-07-31 [email protected] Calendar font factor (flutter/flutter#152341) 2024-07-31 [email protected] Remove redundant usages of zones in skia_client.dart (flutter/flutter#149366) 2024-07-31 [email protected] Set up tests that verify we can build a fresh counter app across our Gradle/AGP/Kotlin support range (flutter/flutter#151568) 2024-07-31 [email protected] remove bringup from Windows tool_integration_tests_* (flutter/flutter#152599) 2024-07-31 [email protected] � : Animation controller now has ability to repeat animation 'n' no. of times. (flutter/flutter#150764) 2024-07-31 [email protected] Roll Flutter Engine from 3b31b21599d1 to 16332725788c (1 revision) (flutter/flutter#152631) 2024-07-31 [email protected] Roll Flutter Engine from b73367a30e9b to 3b31b21599d1 (8 revisions) (flutter/flutter#152625) 2024-07-31 [email protected] Roll Packages from 99e8606 to 46a712f (8 revisions) (flutter/flutter#152622) 2024-07-31 [email protected] Add tests for scaffold messenger examples (flutter/flutter#152536) 2024-07-31 [email protected] Add test for search_anchor.0.dart (flutter/flutter#152371) 2024-07-31 [email protected] Use decoration hint text as the default value for dropdown button hints (flutter/flutter#152474) 2024-07-31 [email protected] Deprecate invalid InputDecoration.collapsed parameters (flutter/flutter#152486) 2024-07-31 [email protected] increase sharding on Windows tool_integration_tests (flutter/flutter#152582) 2024-07-31 [email protected] Roll Flutter Engine from e2ece7e58480 to b73367a30e9b (4 revisions) (flutter/flutter#152592) 2024-07-31 [email protected] Roll Flutter Engine from 0b42657a184e to e2ece7e58480 (2 revisions) (flutter/flutter#152589) 2024-07-31 [email protected] Roll Flutter Engine from 08f9be3ab284 to 0b42657a184e (2 revisions) (flutter/flutter#152586) 2024-07-30 [email protected] Clarify and cleanup the test-exemption wording in tree-hygiene. (flutter/flutter#152402) 2024-07-30 [email protected] [web] Set COEP:credentialless on flutter run/drive. (flutter/flutter#152413) 2024-07-30 [email protected] Roll Flutter Engine from a4b88a37d511 to 08f9be3ab284 (5 revisions) (flutter/flutter#152583) 2024-07-30 [email protected] Marks Mac platform_channel_sample_test_macos to be flaky (flutter/flutter#151884) 2024-07-30 [email protected] Roll Flutter Engine from a6c5ff26c266 to a4b88a37d511 (2 revisions) (flutter/flutter#152575) 2024-07-30 [email protected] Reland #151599 (Add button semantics in list tile ) with a flag to control behavior. (flutter/flutter#152526) 2024-07-30 [email protected] Shift macOS/Android tests from Pixel 7 to mokey in staging (flutter/flutter#152571) 2024-07-30 [email protected] Roll Flutter Engine from 31bb9f98472a to a6c5ff26c266 (5 revisions) (flutter/flutter#152573) 2024-07-30 [email protected] Roll Packages from 247fb5f to 99e8606 (5 revisions) (flutter/flutter#152567) 2024-07-30 [email protected] Fix default avatar icon theme size for Material 2 (flutter/flutter#152307) ...
TytaniumDev
pushed a commit
to TytaniumDev/flutter
that referenced
this pull request
Aug 7, 2024
fixes [Dismissible content overlays Stepper interface while dismissing it](flutter#66007) ### Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatefulWidget { const MyApp({super.key}); @OverRide State<MyApp> createState() => _MyAppState(); } class _MyAppState extends State<MyApp> { final List<String> items = List<String>.generate(20, (int i) => 'Item ${i + 1}'); @OverRide Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: Padding( padding: const EdgeInsets.all(20), child: DecoratedBox( decoration: BoxDecoration( border: Border.all(color: Colors.amber, width: 2), ), child: Padding( padding: const EdgeInsets.all(2.0), child: Column( children: <Widget>[ const SizedBox(height: 8.0), Text( 'Dismissible Widget - Vertical Stepper Widget', style: Theme.of(context).textTheme.titleLarge, ), Expanded( child: Stepper( clipBehavior: Clip.hardEdge, steps: <Step>[ Step( isActive: true, title: const Text('Step 1'), content: ColoredBox( color: Colors.black12, child: ListView.builder( itemCount: items.length, shrinkWrap: true, itemBuilder: (BuildContext context, int index) { final String item = items[index]; return Dismissible( key: Key(item), onDismissed: (DismissDirection direction) { setState(() { items.removeAt(index); }); ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text('$item dismissed'))); }, background: Container(color: Colors.red), child: ListTile(title: Text(item)), ); }, ), ), ), const Step( title: Text('Step 2'), content: Text('content'), ), ], ), ), const Divider(height: 1), const SizedBox(height: 8.0), Text( 'Dismissible Widget - Horizontal Stepper Widget', style: Theme.of(context).textTheme.titleLarge, ), Expanded( child: Stepper( clipBehavior: Clip.hardEdge, type: StepperType.horizontal, elevation: 0.0, steps: <Step>[ Step( isActive: true, title: const Text('Step 1'), content: ColoredBox( color: Colors.black12, child: ListView.builder( itemCount: items.length, shrinkWrap: true, itemBuilder: (BuildContext context, int index) { final String item = items[index]; return Dismissible( key: Key(item), onDismissed: (DismissDirection direction) { setState(() { items.removeAt(index); }); ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text('$item dismissed'))); }, background: Container(color: Colors.red), child: ListTile(title: Text(item)), ); }, ), ), ), const Step( title: Text('Step 2'), content: Text('content'), ), ], ), ), ], ), ), ), ), ), ); } } ``` </details> ### Without `Stepper` step content clipping  ### With `Stepper` step content clipping 
Buchimi
pushed a commit
to Buchimi/flutter
that referenced
this pull request
Sep 2, 2024
fixes [Dismissible content overlays Stepper interface while dismissing it](flutter#66007) ### Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatefulWidget { const MyApp({super.key}); @OverRide State<MyApp> createState() => _MyAppState(); } class _MyAppState extends State<MyApp> { final List<String> items = List<String>.generate(20, (int i) => 'Item ${i + 1}'); @OverRide Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: Padding( padding: const EdgeInsets.all(20), child: DecoratedBox( decoration: BoxDecoration( border: Border.all(color: Colors.amber, width: 2), ), child: Padding( padding: const EdgeInsets.all(2.0), child: Column( children: <Widget>[ const SizedBox(height: 8.0), Text( 'Dismissible Widget - Vertical Stepper Widget', style: Theme.of(context).textTheme.titleLarge, ), Expanded( child: Stepper( clipBehavior: Clip.hardEdge, steps: <Step>[ Step( isActive: true, title: const Text('Step 1'), content: ColoredBox( color: Colors.black12, child: ListView.builder( itemCount: items.length, shrinkWrap: true, itemBuilder: (BuildContext context, int index) { final String item = items[index]; return Dismissible( key: Key(item), onDismissed: (DismissDirection direction) { setState(() { items.removeAt(index); }); ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text('$item dismissed'))); }, background: Container(color: Colors.red), child: ListTile(title: Text(item)), ); }, ), ), ), const Step( title: Text('Step 2'), content: Text('content'), ), ], ), ), const Divider(height: 1), const SizedBox(height: 8.0), Text( 'Dismissible Widget - Horizontal Stepper Widget', style: Theme.of(context).textTheme.titleLarge, ), Expanded( child: Stepper( clipBehavior: Clip.hardEdge, type: StepperType.horizontal, elevation: 0.0, steps: <Step>[ Step( isActive: true, title: const Text('Step 1'), content: ColoredBox( color: Colors.black12, child: ListView.builder( itemCount: items.length, shrinkWrap: true, itemBuilder: (BuildContext context, int index) { final String item = items[index]; return Dismissible( key: Key(item), onDismissed: (DismissDirection direction) { setState(() { items.removeAt(index); }); ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text('$item dismissed'))); }, background: Container(color: Colors.red), child: ListTile(title: Text(item)), ); }, ), ), ), const Step( title: Text('Step 2'), content: Text('content'), ), ], ), ), ], ), ), ), ), ), ); } } ``` </details> ### Without `Stepper` step content clipping  ### With `Stepper` step content clipping 
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Dec 11, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Dec 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



fixes Dismissible content overlays Stepper interface while dismissing it
Code sample
expand to view the code sample
Without
Stepperstep content clippingWith
Stepperstep content clippingPre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.