getInitialTextAsUri static method

Future<Uri?> getInitialTextAsUri()

A convenience method that returns the initially stored link as a new Uri object.

If the link is not valid as a URI or URI reference, a FormatException is thrown.

Implementation

static Future<Uri?> getInitialTextAsUri() async {
  final data = await getInitialText();
  if (data == null) return null;
  return Uri.parse(data);
}