Skip to content

[Impeller] CupertinoDatePicker inside CupertinoModalPopup not working #124658

Closed
flutter-team-archive/engine
#41129

Description

@Brazol

Hey, I couldn't find any related open issue. Here is code snippet. It's working fine with Skia renderer and not at all with Impeller (see videos below).
On Impeller when I tap the button to show popup and then swipe at the area it should show I can feel haptic feedback of DatePicker carousel. So it is there just invisible?

Widget build(BuildContext context) {
    void showDatePicker() {
      showCupertinoModalPopup<void>(
        context: context,
        builder: (_) => Container(
          height: 380,
          color: Theme.of(context).dialogBackgroundColor,
          child: Column(
            children: [
              SizedBox(
                height: 300,
                child: CupertinoDatePicker(
                  initialDateTime: DateTime.now(),
                  onDateTimeChanged: (val) {},
                  mode: CupertinoDatePickerMode.date,
                ),
              ),
              CupertinoButton(
                child: const Text('OK'),
                onPressed: () {
                  Navigator.of(context).pop();
                },
              )
            ],
          ),
        ),
      );
    }

    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: TextButton(
          onPressed: showDatePicker,
          child: const Text('CLICK ME'),
        ),
      ),
    );
  }

Skia:

Skia.mov

Impeller:

impeller.mov
Details Flutter doctor output:

[✓] Flutter (Channel stable, 3.7.10, on macOS 13.3.1 22E261 darwin-x64, locale en-PL)
• Flutter version 3.7.10 on channel stable at /Users/appify/SDKs/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4b12645 (8 days ago), 2023-04-03 17:46:48 -0700
• Engine revision ec975089ac
• Dart version 2.19.6
• DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at /Users/appify/Library/Android/sdk
• Platform android-31, build-tools 33.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
• 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 2022.1)
• 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.15+0-b2043.56-8887301)

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

[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 13.3.1 22E261 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 112.0.5615.49

[✓] HTTP Host Availability
• All required HTTP hosts are available

Activity

  1. added
    in triagePresently being triaged by the triage team
    on Apr 12, 2023
  2. huycozy commented on Apr 12, 2023

    @huycozy
    Member

    Thanks for the report. The issue is reproduced as below. And it doesn't happen on Android but on iOS.

    • Stable:
    Skia Impeller
    ✅ ❌
    • Master:
    Skia Impeller
    ❌ ❌ (*)

    ✅: No Issue ❌: Issue reproduced

    (*) When scrolling on the month (on the left) the picker model can be rendered but is very laggy. May be related: #121476

    flutter doctor -v (stable and master)
    [✓] Flutter (Channel stable, 3.7.10, on macOS 13.0.1 22A400 darwin-x64, locale en-VN)
        • Flutter version 3.7.10 on channel stable at /Users/huynq/Documents/GitHub/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 4b12645012 (2 days ago), 2023-04-03 17:46:48 -0700
        • Engine revision ec975089ac
        • Dart version 2.19.6
        • DevTools version 2.20.1
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
        • Android SDK at /Users/huynq/Library/Android/sdk
        • Platform android-33, build-tools 32.0.0
        • ANDROID_HOME = /Users/huynq/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
        • 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 2022.1)
        • 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.15+0-b2043.56-8887301)
    
    [✓] IntelliJ IDEA Community Edition (version 2022.1.1)
        • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
        • 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
    
    [✓] VS Code (version 1.77.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.60.0
    
    [✓] Connected device (2 available)
        • macOS (desktop) • macos  • darwin-x64     • macOS 13.0.1 22A400 darwin-x64
        • Chrome (web)    • chrome • web-javascript • Google Chrome 111.0.5563.146
    
    [✓] HTTP Host Availability
        • All required HTTP hosts are available
    
    • No issues found!
    [!] Flutter (Channel master, 3.10.0-3.0.pre.55, on macOS 13.0.1 22A400 darwin-x64, locale en-VN)
        • Flutter version 3.10.0-3.0.pre.55 on channel master at /Users/huynq/Documents/GitHub/flutter_master
        ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
        ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision ba8d100597 (54 minutes ago), 2023-04-11 22:33:19 -0400
        • Engine revision 11d3300254
        • Dart version 3.0.0 (build 3.0.0-431.0.dev)
        • DevTools version 2.23.1
        • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
        • Android SDK at /Users/huynq/Library/Android/sdk
        • Platform android-33, build-tools 32.0.0
        • ANDROID_HOME = /Users/huynq/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
        • 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 2022.1)
        • 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.15+0-b2043.56-8887301)
    
    [✓] IntelliJ IDEA Community Edition (version 2022.1.1)
        • IntelliJ at /Users/huynq/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/221.5591.52/IntelliJ IDEA CE.app
        • 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
    
    [✓] VS Code (version 1.77.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.62.0
    
    [✓] Connected device (2 available)
        • macOS (desktop) • macos  • darwin-x64     • macOS 13.0.1 22A400 darwin-x64
        • Chrome (web)    • chrome • web-javascript • Google Chrome 112.0.5615.49
    
    [✓] Network resources
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.
  3. added
    platform-iosiOS applications specifically
    engineflutter/engine related. See also e: labels.
    c: renderingUI glitches reported at the engine/skia or impeller rendering level
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    e: impellerImpeller rendering backend issues and features requests
    and removed
    in triagePresently being triaged by the triage team
    on Apr 12, 2023
  4. jonahwilliams commented on Apr 12, 2023

    @jonahwilliams
    Contributor
    // Copyright 2014 The Flutter Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.
    
    import 'package:flutter/cupertino.dart';
    import 'package:flutter/material.dart';
    import 'package:flutter/widgets.dart';
    
    
    void main() {
      runApp(MaterialApp(home: Example()));
    }
    
    class Example extends StatefulWidget {
      const Example({super.key});
    
      @override
      State<Example> createState() => _ExampleState();
    }
    
    class _ExampleState extends State<Example> {
      void showDatePicker() {
          showCupertinoModalPopup<void>(
            context: context,
            builder: (_) => Container(
              height: 380,
              color: Theme.of(context).dialogBackgroundColor,
              child: Column(
                children: [
                  SizedBox(
                    height: 300,
                    child: CupertinoDatePicker(
                      initialDateTime: DateTime.now(),
                      onDateTimeChanged: (val) {},
                      mode: CupertinoDatePickerMode.date,
                    ),
                  ),
                  CupertinoButton(
                    child: const Text('OK'),
                    onPressed: () {
                      Navigator.of(context).pop();
                    },
                  )
                ],
              ),
            ),
          );
        }
    
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          appBar: AppBar(
            title: Text('Hello'),
          ),
          body: Center(
            child: TextButton(
              onPressed: showDatePicker,
              child: const Text('CLICK ME', style: TextStyle(color: Colors.red)),
            ),
          ),
        );
      }
    }

    App that reproduces issue

  5. added
    r: fixedIssue is closed as already fixed in a newer version
    on Apr 13, 2023
  6. github-actions commented on Apr 27, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  7. locked as resolved and limited conversation to collaborators on Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: renderingUI glitches reported at the engine/skia or impeller rendering levele: 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.7Found to occur in 3.7has 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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions