mirror of https://github.com/AMT-Cheif/drift.git
Migrate type converter sample to null safety
This commit is contained in:
parent
371e744288
commit
c40bfc9f4c
|
@ -44,7 +44,7 @@ a `TypeConverter` for that:
|
|||
class PreferenceConverter extends TypeConverter<Preferences, String> {
|
||||
const PreferenceConverter();
|
||||
@override
|
||||
Preferences mapToDart(String fromDb) {
|
||||
Preferences? mapToDart(String? fromDb) {
|
||||
if (fromDb == null) {
|
||||
return null;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ class PreferenceConverter extends TypeConverter<Preferences, String> {
|
|||
}
|
||||
|
||||
@override
|
||||
String mapToSql(Preferences value) {
|
||||
String? mapToSql(Preferences? value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue