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

Compile Error: File argument type assignment error while using video_player plugin #26

Open
ravi-dhime opened this issue Oct 27, 2021 · 1 comment

Comments

@ravi-dhime
Copy link

Seeing the below error at compilation for web. Below are the details. pls let me know if any more info is needed.

Error

: Error: The argument type 'File/*1*/' can't be assigned to the parameter type 'File/*2*/'.
lib/main.dart:8
- 'File/*1*/' is from 'package:universal_io/src/io/file.dart' ('/home/ravi/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/universal_io-2.0.4/lib/src/io/file.dart').
package:universal_io/…/io/file.dart:1
 - 'File/*2*/' is from 'dart:io'.
    VideoPlayerController.file(File('a non existent file'));
                               ^

Failed to compile application.

Minimal code to recreate the issue

//@dart=2.9

import 'package:universal_io/io.dart';
import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';

VideoPlayerController vpc =
    VideoPlayerController.file(File('a non existent file'));

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

flutter doctor -v

flutter doctor -v
[✓] Flutter (Channel stable, 2.5.2, on Ubuntu 20.04.2 LTS 5.4.0-89-generic, locale en_US.UTF-8)
    • Flutter version 2.5.2 at /home/ravi/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 3595343e20 (4 weeks ago), 2021-09-30 12:58:18 -0700
    • Engine revision 6ac856380f
    • Dart version 2.14.3

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /home/ravi/Android/Sdk/
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /usr/local/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /usr/local/android-studio
    • Flutter plugin version 61.2.2
    • Dart plugin version 203.8430
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.61.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.27.0

[✓] Connected device (2 available)
    • Pixel 4a (mobile) • 192.168.1.6:5555 • android-arm64  • Android 11 (API 30)
    • Chrome (web)      • chrome           • web-javascript • Google Chrome 93.0.4577.63
    ! Device emulator-5554 is offline.

• No issues found!

pubspec dependencies

dependencies:
  flutter:
    sdk: flutter
  video_player: ^2.2.5
  universal_io:
@ravi-dhime
Copy link
Author

@tvolkert , @terrier989 , can you pls comment on this issue.

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

1 participant