dnfield / flutter_svg

SVG parsing, rendering, and widget library for Flutter
MIT License
1.66k stars 455 forks source link

Error: The argument type 'File/*1*/' can't be assigned to the parameter type 'File/*2*/'. #1061

Closed RossComputerGuy closed 4 months ago

RossComputerGuy commented 4 months ago

I get this error on GitHub CI with a project of mine but builds locally.

lib/widgets/user_drawer.dart:96:33:
Error: The argument type 'File/*1*/' can't be assigned to the parameter type 'File/*2*/'.
 - 'File/*1*/' is from 'dart:io'.
 - 'File/*2*/' is from 'package:flutter_svg/src/utilities/_file_none.dart' ('/opt/hostedtoolcache/flutter/3.19.6-stable/x64/.pub-cache/hosted/pub.dev/flutter_svg-2.0.10+1/lib/src/utilities/_file_none.dart').
                                File(app.icon!),

Source: https://github.com/ExpidusOS/genesis/blob/adc692cb405fccd254ae80e992a291772fef6b5a/lib/widgets/user_drawer.dart#L96

Local system:

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.4, on NixOS 23.11 (Tapir) 6.6.0-asahi, locale ja_JP.UTF-8)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] Connected device (1 available)
[✓] Network resources

! Doctor found issues in 3 categories.
RossComputerGuy commented 4 months ago

Duplicate of #1059