Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting build errors? #881

Closed
fisforfaheem opened this issue Jan 6, 2025 · 5 comments
Closed

getting build errors? #881

fisforfaheem opened this issue Jan 6, 2025 · 5 comments

Comments

@fisforfaheem
Copy link

Launching lib\main.dart on Pixel 7 in debug mode...
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/chewie-1.8.7/lib/src/material/material_controls.dart:473:35: 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'.
    color: Colors.white.withValues(alpha: .75),
    ^^^^^^^^^^
    ../../../../AppData/Local/Pub/Cache/hosted/pub.dev/chewie-1.8.7/lib/src/material/material_controls.dart:685:57: 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'.
    Theme.of(context).colorScheme.surface.withValues(alpha: 0.5),
    ^^^^^^^^^^
    ../../../../AppData/Local/Pub/Cache/hosted/pub.dev/chewie-1.8.7/lib/src/material/material_controls.dart:687:51: 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'.
    Theme.of(context).disabledColor.withValues(alpha: .5),
    ^^^^^^^^^^
    ../../../../AppData/Local/Pub/Cache/hosted/pub.dev/chewie-1.8.7/lib/src/material/material_desktop_controls.dart:651:57: 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'.
    Theme.of(context).colorScheme.surface.withValues(alpha: 0.5),
    ^^^^^^^^^^
    ../../../../AppData/Local/Pub/Cache/hosted/pub.dev/chewie-1.8.7/lib/src/material/material_desktop_controls.dart:653:51: 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'.
    Theme.of(context).disabledColor.withValues(alpha: 0.5),
    ^^^^^^^^^^
    Target kernel_snapshot_program failed: Exception

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command 'E:\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

BUILD FAILED in 27s
Error: Gradle task assembleDebug failed with exit code 1

Exited (1).

@diegotori
Copy link
Collaborator

@fisforfaheem please ensure that your Flutter version is at 3.27. Otherwise, you'll have to remain in 1.8.5 until you decide to upgrade your flutter version.

@sk92129
Copy link

sk92129 commented Jan 7, 2025

My project uses chewie and is getting this error because we can't upgrade yet -- the timing is very bad. From running: flutter pub deps, I see that flutter_widget_from_html is including chewie. I dont use the video portion of this widget, is there a way to disable that feature so that the component does not pull in chewie?

@diegotori
Copy link
Collaborator

You can downgrade to 1.8.5 and pin that version in until you get around to upgrading.

@anggaaryas
Copy link

I encountered this issue as well. The problem arises because Chewie automatically updates to version 1.8.7. A temporary solution is to pin the version to avoid auto-upgrading.

chewie: 1.7.5

Note that the version is specified without the '^' symbol to prevent automatic updates.

@diegotori
Copy link
Collaborator

@fisforfaheem just published version 1.9.1 which isolates the deprecated withOpacity call into a single compatibility extension method, with full documentation so that it can be removed once the Flutter team does.

From now on, this library will make a best effort in trying to support the latest N-1 Flutter version at the very minimum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants