You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
static String basename(dynamic entity, [bool showFileExtension = true]) {
if (entity is Directory) {
return entity.path.split('/').last;
} else if (entity is File) {
return (showFileExtension) ====> should be (!showFileExtension)
? entity.path.split('/').last.split('.').first
: entity.path.split('/').last;
} else {
print(
"Please provide a Object of type File, Directory or FileSystemEntity");
return "";
}
}
To Reproduce
Steps to reproduce the behavior:
Go to '...'
Click on '....'
Scroll down to '....'
See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
**Logs **
Run flutter analyze and attach any output of that command below.
If there are any analysis errors, try resolving them before filing this issue.
Paste the output of running flutter doctor -v here.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
zhuyijing
changed the title
showFileExtension is not working
showFileExtension is not working as expect
Apr 15, 2022
Describe the bug
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
**Logs **
Run
flutter analyze
and attach any output of that command below.If there are any analysis errors, try resolving them before filing this issue.
Paste the output of running
flutter doctor -v
here.Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: