mirror of https://github.com/AMT-Cheif/drift.git
Only add nullable suffix on converter types when NNBD is active
This commit is contained in:
parent
4575287ba4
commit
d54936df91
|
@ -44,7 +44,8 @@ extension OperationOnTypes on HasType {
|
|||
/// [int].
|
||||
String dartTypeCode([GenerationOptions options = const GenerationOptions()]) {
|
||||
if (typeConverter != null) {
|
||||
final needsSuffix = nullable && !typeConverter.hasNullableDartType;
|
||||
final needsSuffix =
|
||||
options.nnbd && nullable && !typeConverter.hasNullableDartType;
|
||||
final baseType = typeConverter.mappedType.codeString(options);
|
||||
|
||||
return needsSuffix ? '$baseType?' : baseType;
|
||||
|
|
Loading…
Reference in New Issue