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

filePath为null 调试报错 #33

Open
practicingman opened this issue Nov 21, 2019 · 1 comment
Open

filePath为null 调试报错 #33

practicingman opened this issue Nov 21, 2019 · 1 comment

Comments

@practicingman
Copy link

 String filePath = await _channel.invokeMethod(
      'saveFile',
      <String, dynamic>{
        'fileData': fileData,
        'title': title,
        'description': description
      },
    );
    debugPrint("saved filePath:" + filePath);  《======= 这里报错
    //process ios return filePath
    if(filePath.startsWith("file://")){
      filePath=filePath.replaceAll("file://", "");
    }
    return  filePath;
  }

iOS 13.1 (17A844)

filePath永远返回为null
我同事说IOS不会返回路径,是这个原因吗?
现在调试一直报错

谢谢

@toonztudio
Copy link

toonztudio commented Dec 18, 2019

Sorry, I don't understand Chinese but I can confirm this issue.
I found the debugPrint result too. This is my debug result.

Xcode build done. 22.8s PHImageFileDataKey = {length = 538642, bytes = 0x89504e47 0d0a1a0a 0000000d 49484452 ... 49454e44 ae426082 }; PHImageFileOrientationKey = 0; PHImageFileUTIKey = "public.png"; PHImageResultIsDegradedKey = 0; PHImageResultRequestIDKey = 1; } [VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: Invalid argument(s) #0 _StringBase.+ (dart:core-patch/string_patch.dart:265:57) #1 ImagePickerSaver.saveFile package:image_picker_saver/image_picker_saver.dart:85 <asynchronous suspension> #2 _HomeState.takeScreenShot package:screen_cap_test/home.dart:50 <asynchronous suspension> #3 _HomeState.build.<anonymous closure> package:screen_cap_test/home.dart:149 #4 _InkResponseState._handleTap package:flutter/…/material/ink_well.dart:706 #5 _InkResponseState.build.<anonymous closure> package:flutter/…/material/ink_well.dart:789 #6 GestureRecognizer.invokeCallback package:flutter/…/gestures/recognizer.dart:182 #7 TapGestureRecognizer.handleTapUp package:flutter/…/gestures/tap.dart:486 #8 BaseTapGestureRecognizer._checkUp package:flutter/…/gestures/tap.dart:264 #9 BaseTapGestureRecognizer.handlePrimaryPointer package:flutter/…/gestures/tap.dart:199 #1<…>

Should we remove this debug result ?

Thank you for your awesome plugin. It's really help me a lot :)

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

2 participants