Snippet
extension NotEmptyOrThrowTExtension<String> on String? {
String notEmptyOrThrow(Object exception) {
final self = this;
if (self == null) {
throw exception;
}
if (self.isEmpty) {
return self;
}
return self;
}
}
Actual behavior
Expected behavior
isEmpty is recognized.
Version
Dart SDK version: 3.5.4 (stable) (Wed Oct 16 16:18:51 2024 +0000) on "macos_arm64"