getNameFile method Null safety

Future<String> getNameFile(
  1. {required String url}
)

get the url name

Implementation

static Future<String> getNameFile({required String url}) async {
   try {
     if (Platform.isWindows) return url.split("/").last;
     return await _channel.invokeMethod('getName', url);
   } on PlatformException catch (e) {
     throw OpenDocumentException('getNameFile: ${e.stacktrace.toString()}');
   }
 }