Skip to content

Conversation

@TahaTesser
Copy link
Member

@TahaTesser TahaTesser commented Jan 18, 2024

This updates the previous attempt #135855 and removes the complications when testing M3 ink sparkle effect.
Thanks to this PR by @Piinks

fixes ExpansionTile InkSplash doesn't respect Shape's borderRadius
fixes ExpansionTile.backgroundColor & ExpansionTile.collapsedBackgroundColor removes splash effect

Code sample

expand to view the code sample
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Example(),
    );
  }
}

class Example extends StatelessWidget {
  const Example({super.key});

  @override
  Widget build(BuildContext context) {
    return const Scaffold(
      body: Center(
          child: Padding(
        padding: EdgeInsets.symmetric(horizontal: 24.0),
        child: ExpansionTile(
          collapsedBackgroundColor: Color(0x25ff0000),
          backgroundColor: Color(0x250000ff),
          collapsedShape: RoundedRectangleBorder(
            borderRadius: BorderRadius.all(Radius.circular(30.0)),
            side: BorderSide(color: Colors.black, width: 2.0),
          ),
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.all(Radius.circular(30.0)),
            side: BorderSide(color: Colors.black, width: 2.0),
          ),
          clipBehavior: Clip.hardEdge,
          title: Text('Expansion Tile'),
          children: <Widget>[
            FlutterLogo(size: 50),
            FlutterLogo(size: 50),
            FlutterLogo(size: 50),
            FlutterLogo(size: 50),

          ],
        ),
      )),
    );
  }
}

Before

Screenshot 2024-01-18 at 18 16 15 Screenshot 2024-01-18 at 18 16 44

After

Screenshot 2024-01-18 at 18 20 27 Screenshot 2024-01-18 at 18 20 53

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 this PR is test-exempt.
  • All existing and new tests are passing.

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: material design flutter/packages/flutter/material repository. labels Jan 18, 2024
@TahaTesser TahaTesser force-pushed the expansion_tile_shape branch 2 times, most recently from 3165cd8 to 8f86887 Compare January 18, 2024 15:38
@TahaTesser TahaTesser marked this pull request as ready for review January 18, 2024 16:24
@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #141777 at sha 8f86887c4ba5fb31aa70c828e4590bf2dfb58a87

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Jan 18, 2024
@TahaTesser TahaTesser force-pushed the expansion_tile_shape branch 2 times, most recently from b6d3456 to 0c2c8ca Compare January 19, 2024 11:16
@TahaTesser TahaTesser requested a review from HansMuller January 19, 2024 11:49
@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #141777 at sha 0c2c8cac0bfc8d1b7f6d3fdaeecb33418caa584b

Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@LucasMatheusDev LucasMatheusDev left a comment

Choose a reason for hiding this comment

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

good job

@TahaTesser TahaTesser force-pushed the expansion_tile_shape branch from 0c2c8ca to 3996f23 Compare January 22, 2024 10:04
@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #141777 at sha 3996f23

@TahaTesser TahaTesser added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 22, 2024
@auto-submit auto-submit bot merged commit 9574d58 into flutter:master Jan 22, 2024
@TahaTesser TahaTesser deleted the expansion_tile_shape branch January 22, 2024 11:15
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 22, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 22, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jan 22, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jan 22, 2024
flutter/flutter@5dea6b9...3ee8ff2

2024-01-22 [email protected] Roll Flutter Engine from 40c5e9ce6596 to c49989292fc1 (1 revision) (flutter/flutter#141966)
2024-01-22 [email protected] Roll Packages from 129e08c to e4cbf23 (11 revisions) (flutter/flutter#141962)
2024-01-22 [email protected] Mark defaultTargetPlatform as constant for non-debug non-web builds. (flutter/flutter#141105)
2024-01-22 [email protected] Fix `shape` and `collapsedShape` isn't applied to `ExpansionTile`'s splash ink (flutter/flutter#141777)
2024-01-22 [email protected] Reapply "Native assets: roll deps" (#141748) (flutter/flutter#141864)
2024-01-22 [email protected] Roll Flutter Engine from 11c585f48b77 to 40c5e9ce6596 (1 revision) (flutter/flutter#141956)
2024-01-22 [email protected] Update `ToggleButtons`, `ExpansionPanel`, and `ExpandIcon` tests for Material 3 (flutter/flutter#141868)
2024-01-22 [email protected] Roll Flutter Engine from c485c574fb1d to 11c585f48b77 (1 revision) (flutter/flutter#141952)
2024-01-22 [email protected] Roll Flutter Engine from a7b207d5a1fe to c485c574fb1d (1 revision) (flutter/flutter#141951)

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 [email protected],[email protected],[email protected] 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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files

Projects

None yet

3 participants