Skip to content

Pointing hand shown on disabled IconButton in Flutter desktop app on macOS #63885

@droidery

Description

@droidery

Steps to Reproduce

  1. Run flutter create bug for macOS.
  2. Update the files as follows:
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: IconButton(
          icon: Icon(Icons.ac_unit),
          onPressed: null,
        ),
      ),
    );
  }
}
  1. Hover over the disabled IconButton with cursor

Expected results:

When button is disabled, should not show pointing hand cursor:

no-hover-state-change

This button example is from https://material.angular.io/components/button/overview.

Actual results:

hover-over

In Flutter for macOS, hovering over the IconButton shows the pointing hand cursor, even though the button is disabled.

The pointing hand cursor should only be shown if the button is clickable.

Logs
Analyzing repro_macos_clickable_button...
No issues found! (ran in 3.9s)
[✓] Flutter (Channel master, 1.21.0-10.0.pre.113, on Mac OS X 10.15.6 19G2021, locale en-US)
    • Flutter version 1.21.0-10.0.pre.113 at /Users/droidery/flutter
    • Framework revision 780f5f9904 (14 hours ago), 2020-08-15
    • Engine revision 7571e7c380
    • Dart version 2.10.0 (build 2.10.0-11.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/droidery/Library/Android/sdk
    • Platform android-29, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.6, Build version 11E708
    • CocoaPods version 1.9.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] IntelliJ IDEA Community Edition (version 2020.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 48.0.4
    • Dart plugin version 202.6397.47

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

[✓] Connected device (1 available)
    • macOS (desktop) • macos • darwin-x64 • Mac OS X 10.15.6 19G2021

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: desktopRunning on desktopa: fidelityMatching the OEM platforms betterf: material designflutter/packages/flutter/material repository.found in release: 1.21Found to occur in 1.21frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions