Skip to content

[Impeller] InkSparkle splash not clipping on iOS. #126701

Description

@luccasclezar

Is there an existing issue for this?

Steps to reproduce

  1. Set the splashFactory to InkSparkle.splashFactory
  2. Run the app with Impeller enabled on iOS.
  3. Tap a button/inkwell.

Expected results

The button/inkwell should display the sparkle, correctly clipping the effect to the shape/border of the material.

Actual results

  • Debug mode: The sparkle doesn't happen at all, with the UI hanging for the time of the effect. If the button/inkwell is kept pressed, after ~1 second the widget instantly appears as pressed.
  • Release mode: The sparkle happens without hanging the UI, but it doesn't clip to the border/shape of the material.

If Impeller is disabled with --no-enable-impeller, InkSparkle works normally.

Code sample

This is the app from the videos.

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(
          seedColor: Colors.deepPurple,
        ),
        useMaterial3: true,
        splashFactory: InkSparkle.splashFactory,
      ),
      home: const MyHomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: Center(
          child: Column(
            children: [
              InkWell(
                borderRadius: BorderRadius.circular(24),
                onTap: () {},
                child: const Padding(
                  padding: EdgeInsets.all(24),
                  child: Text('Press me'),
                ),
              ),
              const SizedBox(height: 24),
              FilledButton(
                onPressed: () {},
                child: const Padding(
                  padding: EdgeInsets.all(24),
                  child: Text('Press me'),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
Debug Release
I'm pressing as soon as the mouse stops, as you can see, nothing happens for a while in debug mode.
bug_debug.mp4
And in release mode the sparkle is not clipping.
bug_release.MP4

Logs

No response

Flutter Doctor output

Tested on stable and master channels, both with the same issue.

Doctor output - Stable channel
[✓] Flutter (Channel stable, 3.10.1-0.0.pre.1, on macOS 13.2.1 22D68 darwin-x64, locale en-BR)
    • Flutter version 3.10.1-0.0.pre.1 on channel stable at /usr/local/Caskroom/flutter/3.0.5/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 38b9918850 (5 weeks ago), 2023-04-07 11:07:23 -0700
    • Engine revision d44b5a94c9
    • Dart version 3.0.0
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/luccas/Library/Developer/Xamarin/android-sdk-macosx
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.78.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.64.0

[✓] Connected device (3 available)
    • iPhone 12 Pro Max (mobile) • 11605EBF-6D6C-41FF-A907-1C81093F3264 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)            • macos                                • darwin-x64     • macOS 13.2.1 22D68 darwin-x64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 113.0.5672.92

[✓] Network resources
    • All expected network resources are available.

• No issues found!
Doctor output - Master channel
[✓] Flutter (Channel master, 3.11.0-5.0.pre.57, on macOS 13.2.1 22D68 darwin-x64, locale en-BR)
    • Flutter version 3.11.0-5.0.pre.57 on channel master at /Users/luccas/Documents/VSCode/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9c72f5a7e6 (14 minutes ago), 2023-05-12 14:49:35 -0400
    • Engine revision c784d6d413
    • Dart version 3.1.0 (build 3.1.0-102.0.dev)
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/luccas/Library/Developer/Xamarin/android-sdk-macosx
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.78.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.64.0

[✓] Connected device (3 available)
    • iPhone 12 Pro Max (mobile) • 11605EBF-6D6C-41FF-A907-1C81093F3264 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)            • macos                                • darwin-x64     • macOS 13.2.1 22D68 darwin-x64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 113.0.5672.92

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work liste: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.found in release: 3.10Found to occur in 3.10found in release: 3.11Found to occur in 3.11has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions