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

Error when try to install slidy #281

Closed
BerkSpar opened this issue Jan 25, 2023 · 11 comments
Closed

Error when try to install slidy #281

BerkSpar opened this issue Jan 25, 2023 · 11 comments

Comments

@BerkSpar
Copy link

Description

I tried to install slidy using flutter pub global activate slidy and got an error. My flutter doctor:

flutter doctor -v
[√] Flutter (Channel stable, 3.7.0, on Microsoft Windows [versÆo 10.0.22000.1455], locale pt-BR)
    • Flutter version 3.7.0 on channel stable at C:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b06b8b2710 (2 days ago), 2023-01-23 16:55:55 -0800
    • Engine revision b24591ed32
    • Dart version 2.19.0
    • DevTools version 2.20.1

[X] Windows Version (Unable to confirm if installed Windows version is 10 or greater)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\UEX Tecnologia\AppData\Local\Android\sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.3.4)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.3.32901.215
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\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 11.0.12+7-b1504.28-7817840)

[√] VS Code (version 1.74.3)
    • VS Code at C:\Users\UEX Tecnologia\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.56.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [versÆo 10.0.22000.1455]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 109.0.5414.75
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 109.0.1518.61

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

Log

flutter pub global activate slidy   
Resolving dependencies...
+ ansicolor 2.0.1
+ args 2.3.2
+ async 2.10.0
+ characters 1.2.1
+ clock 1.1.1
+ collection 1.17.0
+ crypto 3.0.2
+ dart_console 1.1.2
+ ffi 2.0.1
+ fhir_yaml 0.4.2 (0.9.0 available)
+ file 6.1.4
+ fpdart 0.2.0 (0.4.0 available)
+ http 0.13.5
+ http_parser 4.0.2
+ intl 0.17.0 (0.18.0 available)
+ io 1.0.4
+ matcher 0.12.14
+ meta 1.8.0
+ modular_core 2.0.3+1
+ modular_interfaces 2.0.2 (3.0.0 available)
+ oauth2 2.0.1
+ path 1.8.3
+ pub_api_client 2.3.0
+ pub_semver 2.1.3
+ pubspec 2.3.0
+ quiver 3.2.1
+ recase 4.1.0
               ^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/slidy-4.0.3/lib/src/core/models/custom_file.dart:24:16: Error: The method 'CustomFile.create' doesn't have the named parameter 'exclusive' of overridden method 'File.create'.
  Future<File> create({bool recursive = false}) {
               ^
/C:/src/flutter/bin/cache/dart-sdk/lib/io/file.dart:232:16: Context: This is the overridden method ('create').
  Future<File> create({bool recursive = false, bool exclusive = false});
               ^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/slidy-4.0.3/lib/src/core/models/custom_file.dart:29:8: Error: The method 'CustomFile.createSync' has fewer named arguments than those of overridden method 'File.createSync'.
  void createSync({bool recursive = false}) {
       ^
/C:/src/flutter/bin/cache/dart-sdk/lib/io/file.dart:248:8: Context: This is the overridden method ('createSync').
  void createSync({bool recursive = false, bool exclusive = false});
       ^
../../../AppData/Local/Pub/Cache/hosted/pub.dev/slidy-4.0.3/lib/src/core/models/custom_file.dart:29:8: Error: The method 'CustomFile.createSync' doesn't have the named parameter 'exclusive' of overridden method 'File.createSync'.
  void createSync({bool recursive = false}) {
       ^
/C:/src/flutter/bin/cache/dart-sdk/lib/io/file.dart:248:8: Context: This is the overridden method ('createSync').
  void createSync({bool recursive = false, bool exclusive = false});
       ^
pub finished with exit code 1
@m4rc0s
Copy link
Contributor

m4rc0s commented Jan 25, 2023

Thats true! I did some tests with the File class from dart:io library and this error is caused by breaking change

Breaking change dart-lang/sdk#49647: File.create now takes new optional exclusive bool parameter, and when it is true the operation will fail if target file already exists.

that was introduced in version 2.19 of Dart.

This change comes from this issue:

#49647

I'm working on a local version of slidy that fixes this problem.
If the mainteners want, I can open a PR later with the correction for us to work on and release a new version with the fix;

Basically the solution start with the create and createAsync methods of File class that must be override like this:

  Future<File> create({bool exclusive = true, bool recursive = false}) {
    return _file.create(recursive: recursive);
  }

  @override
  void createSync({bool exclusive = true, bool recursive = false}) {
    _file.createSync(recursive: recursive);
  }

@julioffigueiredo
Copy link

Mesmo aqui com a atualização do dart
Dart SDK version: 2.19.0 (stable) (Mon Jan 23 11:29:09 2023 -0800) on "windows_x64"

@HudsonAfonso
Copy link
Contributor

+1

@luccacondratiuk
Copy link

Same

$ dart --version                
Dart SDK version: 2.19.0-146.2.beta (beta) (Tue Sep 20 10:30:48 2022 +0000) on "linux_x64"

$ flutter --version
Flutter 3.4.0-17.2.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision d6260f127f (4 months ago) • 2022-09-21 13:33:49 -0500
Engine • revision 3950c6140a
Tools • Dart 2.19.0 (build 2.19.0-146.2.beta) • DevTools 2.16.0

Same as #280 I think...

@BerkSpar
Copy link
Author

@m4rc0s can you create a PR with the changes?

@m4rc0s
Copy link
Contributor

m4rc0s commented Jan 26, 2023

@m4rc0s can you create a PR with the changes?

Shure! Ill do that!

@m4rc0s
Copy link
Contributor

m4rc0s commented Jan 26, 2023

@BerkSpar PR open: #282

Please let me know if theres something that I need to do to put my PR/Merge according to some contribution guide;

@BerkSpar
Copy link
Author

Thanks, @m4rc0s! I didn't found any contribution guide in this repository. I guess it all ok.

@Bwolfs2 can you see this PR #282 and merge if avaiable?

@Bwolfs2
Copy link
Member

Bwolfs2 commented Jan 30, 2023

I`m busy here.... @jacobaraujo7 can accept and publish?

@HudsonAfonso
Copy link
Contributor

podem instalar usando o comando:

dart pub global activate --source git https://github.com/Flutterando/slidy

@BerkSpar
Copy link
Author

Slidy is current working in version 4.x. Thanks for all!

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

6 participants