packageName property

String? get packageName

Extracts the package name from the shortUri.

Returns:

  • For 'package:foo/bar.dart': returns 'foo'
  • For 'asset:foo/bar.dart': returns 'foo'
  • For 'dart:core/string.dart': returns 'dart'
  • For other URI schemes: returns null

Implementation

String? get packageName;