drift
drift copied to clipboard
moor file warning: Must be an interface type (backed by a class)
moor 4.4.1 moor_generator 4.4.1
In VS Code, I'm getting a warning:
Must be an interface type (backed by a class) dart(moor.errorGeneric)
Here's an example part of the moor file:
The UriConverter classs looks like this:
class UriConverter extends TypeConverter<Uri, String> {
const UriConverter();
@override
Uri? mapToDart(String? fromDb) {
if (fromDb == null) {
return null;
}
return Uri.parse(fromDb);
}
@override
String? mapToSql(Uri? value) {
if (value == null) {
return null;
}
return value.toString();
}
}
I see, I think this is because we don't properly support resolving Dart expressions in the plugin yet. I'll take a look at how that might be done.
I've fixed this in 230a18abdc1fa3eda461a7093f8f33fb62547440, but I still need to investigate a potential performance impact of that approach.