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

Won't build for Linux desktop #511

Closed
vladaman opened this issue Jan 24, 2021 · 3 comments · Fixed by #548
Closed

Won't build for Linux desktop #511

vladaman opened this issue Jan 24, 2021 · 3 comments · Fixed by #548

Comments

@vladaman
Copy link

Due to dependency on chewie 0.9.10 the build fails when trying to compile for Linux desktop platform.

ERROR: /opt/flutter/.pub-cache/hosted/pub.dartlang.org/chewie-0.9.10/lib/src/chewie_player.dart:276:17: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.
ERROR:  - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('/opt/flutter/packages/flutter/lib/src/widgets/framework.dart').
ERROR: Try correcting the name to the name of an existing method, or defining a method named 'inheritFromWidgetOfExactType'.
ERROR:         context.inheritFromWidgetOfExactType(_ChewieControllerProvider)
ERROR:                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR: /opt/flutter/.pub-cache/hosted/pub.dartlang.org/chewie_audio-1.0.0+1/lib/src/chewie_player.dart:101:17: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.
ERROR:  - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('/opt/flutter/packages/flutter/lib/src/widgets/framework.dart').
ERROR: Try correcting the name to the name of an existing method, or defining a method named 'inheritFromWidgetOfExactType'.
ERROR:         context.inheritFromWidgetOfExactType(_ChewieAudioControllerProvider)
ERROR:                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exception: Build process failed
flutter doctor -v
[✓] Flutter (Channel dev, 1.26.0-12.0.pre, on Linux, locale en_US.UTF-8)
    • Flutter version 1.26.0-12.0.pre at /opt/flutter
    • Framework revision a706cd2112 (10 days ago), 2021-01-14 18:20:26 -0500
    • Engine revision effb529ece
    • Dart version 2.12.0 (build 2.12.0-224.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /home/vlad/Android/Sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Linux toolchain - develop for Linux desktop
    • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
    • cmake version 3.10.2
    • ninja version 1.8.2
    • pkg-config version 0.29.1

[✓] Android Studio
    • Android Studio at /opt/android-studio
    • 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 1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (2 available)
    • DUK L09 (mobile) • XXXXXX • android-arm64 • Android 9 (API 28)
    • Linux (desktop)  • linux            • linux-x64     • Linux
• No issues found!
@MarcusTomlinson
Copy link

MarcusTomlinson commented Feb 1, 2021

This is actually a chewie_audio issue. See: Sub6Resources/chewie_audio#9

Seems a package update is needed here: https://pub.dev/packages/chewie_audio

@tneotia
Copy link
Collaborator

tneotia commented Feb 1, 2021

When #509 is merged this will hopefully be fixed. You can use my branch in your pubspec if you need the fix now.

@fbertini
Copy link

fbertini commented Mar 5, 2021

Hi,

I solved adding the two following dev_dependencies to pubspec.yaml file:

dev_dependencies:
  flutter_test:
    sdk: flutter
  chewie_audio: ^1.1.2
  flutter_svg: ^0.19.3

I also added flutter_svg because of this bug.

@tneotia tneotia mentioned this issue Mar 5, 2021
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

Successfully merging a pull request may close this issue.

4 participants