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

flutter can't import lpinyin.dart #3

Closed
itlwy opened this issue Sep 3, 2019 · 2 comments
Closed

flutter can't import lpinyin.dart #3

itlwy opened this issue Sep 3, 2019 · 2 comments

Comments

@itlwy
Copy link

itlwy commented Sep 3, 2019

flutter can't import lpinyin.dart,error as below:

Try correcting the name to the name of an existing getter, or defining a getter or field named 'PinyinHelper'.
String pinyin = PinyinHelper.getPinyinE(user.userName);
^^^^^^^^^^^^
Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:package%3Alpinyin%2Flpinyin.dart; message=StandardFileSystem only supports file:*
and data:* URIs)
#0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:33:7)

#1 asFileUri (package:vm/kernel_front_end.dart:601:37)

#2
FrontendCompiler._outputDependenciesDelta (package:vm/frontend_server.dart:401:39)

#3 FrontendCompiler.compile (package:vm/frontend_server.dart:375:
13)

#4 _FlutterFrontendCompiler.compile (package:frontend_ser
ver/server.dart:31:22)

#5 starter (package:frontend_server/s
erver.dart:128:27)

#6 main (file:///C:/b/s/w/ir/k/src/flutter/frontend_ser
ver/bin/starter.dart:8:30)

#7 _startIsolate. (
dart:isolate-patch/isolate_patch.dart:299:32)
#8 _RawReceivePortImpl._handleMessage (dart:i
solate-patch/isolate_patch.dart:172:12)

@itlwy
Copy link
Author

itlwy commented Sep 3, 2019

Flutter 1.7.8+hotfix.4
please help,thanks

@Sky24n
Copy link
Member

Sky24n commented Sep 3, 2019

Step 1:
dependencies:
  lpinyin: ^1.0.7

Step 2:
flutter packages get  
  
Step 3import 'package:lpinyin/lpinyin.dart';

String pinyin = PinyinHelper.getPinyinE(user.userName);

@itlwy itlwy closed this as completed Sep 5, 2019
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