getImageNameByPath static method

String? getImageNameByPath(
  1. String filePath
)

根据图片本地路径获取图片名称

Implementation

static String? getImageNameByPath(String filePath) {
  /// ignore: null_aware_before_operator
  return filePath.substring(filePath.lastIndexOf("/") + 1, filePath.length);
}