NotificationPreferencesDto has a nullable osPermissionGranted field to track whether the user has ever made a permission decision.
globalEnabled, shoppingEnabled, cleaningEnabled fieldsosPermissionGranted: bool? field addednull = undetermined (never asked)true = user granted at some pointfalse = user denied at some pointcopyWith updated to support the new fieldUpdateNotificationPreferencesRequest updated to include fieldosPermissionGranted field exists and is nullablecopyWith includes osPermissionGranted parameterUpdateNotificationPreferencesRequest can update the fieldosPermissionGranted: bool? field to NotificationPreferencesDto@JsonKey(defaultValue: null) annotationosPermissionGrantedcreate factory to set osPermissionGranted: nullcopyWith method to include osPermissionGrantedosPermissionGranted: bool? to UpdateNotificationPreferencesRequest./scripts/run_build_generator.sh to regenerateflutter analyze to verify no issues
Reacties