Skip to content

Method 'withValues' Not Defined for 'Color' in flutter_screen_lock #122

@TaufikPayrecom

Description

@TaufikPayrecom

../../.pub-cache/hosted/pub.dev/flutter_screen_lock-9.2.1/lib/src/functions.dart:62:34: Error: The method 'withValues' isn't defined for the class 'Color'.

  • 'Color' is from 'dart:ui'.
    Try correcting the name to the name of an existing method, or defining a method named 'withValues'.
    barrierColor: Colors.black.withValues(alpha: 0.2),

Steps to Reproduce:

  1. Add flutter_screen_lock: 9.2.1 to pubspec.yaml.
  2. Run the application.
  3. The build fails with the above error.

flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.4, on macOS 15.3.1 24D70 darwin-arm64, locale en-MY)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] VS Code (version 1.85.2)
[✓] Connected device (4 available)
! Error: Browsing on the local area network for iPad 8th Gen. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions