yim
7b262d926d
Test SliverMainAxisGroup
offstage child (#159406)
```dart
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('my test', (WidgetTester tester) async {
await tester.pumpWidget(
MaterialApp(
home: LayoutBuilder(
builder: (context, view) {
return CustomScrollView(
slivers: [
SliverMainAxisGroup(
slivers: [
SliverToBoxAdapter(child: SizedBox(height: view.maxHeight)),
const SliverToBoxAdapter(child: Text('1')),
],
)
],
);
},
),
),
);
expect(find.text('1'), findsNothing);
});
}
```
The above test should have passed, but it failed. This PR fixes the
issue.
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2024-12-11 00:58:59 +00:00
..
2024-10-25 07:05:26 +00:00
2024-10-10 15:48:17 +00:00
2024-05-10 21:55:51 +00:00
2024-05-29 12:10:34 +00:00
2023-04-04 20:34:29 +00:00
2024-01-11 17:05:01 -08:00
2024-05-27 07:12:56 +00:00
2024-05-23 08:52:13 +00:00
2024-10-12 13:54:31 +00:00
2024-06-12 05:22:23 +00:00
2023-06-08 22:57:19 +00:00
2024-07-05 20:33:20 +00:00
2024-04-19 19:21:08 +00:00
2024-05-10 21:54:16 +00:00
2024-01-12 22:10:25 +00:00
2024-05-24 19:21:12 +00:00
2024-10-28 10:47:23 +00:00
2024-10-29 09:02:01 +00:00
2024-08-06 02:28:25 +00:00
2024-02-01 21:54:46 +00:00
2024-10-25 07:13:22 +00:00
2024-10-30 03:01:18 +00:00
2023-06-28 09:41:58 -07:00
2024-11-06 16:40:14 +00:00
2024-05-01 16:03:12 +00:00
2024-06-20 17:55:07 +00:00
2024-05-29 20:05:25 +00:00
2024-11-04 01:47:30 +00:00
2023-04-04 20:34:29 +00:00
2024-10-11 20:53:18 +00:00
2024-10-31 10:47:14 +00:00
2024-10-28 17:02:07 +00:00
2024-08-22 03:40:09 +00:00
2024-10-29 02:40:41 +00:00
2024-11-01 06:41:13 +00:00
2024-04-16 22:10:56 +00:00
2024-09-28 09:20:32 +00:00
2024-10-30 20:50:00 +00:00
2024-05-13 22:45:51 +00:00
2024-10-29 09:01:59 +00:00
2024-01-24 23:44:11 +00:00
2024-05-07 09:04:49 -07:00
2024-04-19 19:08:07 +00:00
2024-10-28 11:37:15 +00:00
2024-05-23 08:34:23 +00:00
2024-10-02 20:08:11 +00:00
2024-12-09 19:54:08 +00:00
2024-12-05 16:54:09 +00:00
2023-05-25 15:58:52 +00:00
2024-10-30 05:46:21 +00:00
2024-08-23 06:57:28 +00:00
2024-11-06 08:34:36 +00:00
2024-05-20 17:49:04 +00:00
2024-12-05 16:54:09 +00:00
2024-08-21 09:45:32 +00:00
2024-12-11 00:58:59 +00:00
2024-05-13 15:30:49 +00:00
2024-05-15 18:37:05 +00:00
2024-04-26 21:30:17 +00:00
2024-02-28 18:10:50 -06:00
2024-05-23 18:57:14 +00:00
2024-05-30 20:17:04 +00:00
2024-05-21 22:19:04 +00:00
2024-09-04 06:38:33 +00:00
2024-10-01 23:15:53 +00:00
2023-08-17 23:55:05 +00:00