withParsedMeta method
PushNotificationModel
withParsedMeta(
- PushNotificationMetadataMapper? mapper, [
- Map<
String, dynamic> ? map
override
This method will return a new instance with correct decoded metadata of PushNotificationMetadata model If you are implementing a custom implementation of PushNotificationModel class you must make sure you are implementing this method and using to type your meta
Implementation
@override
PushNotificationModel withParsedMeta(PushNotificationMetadataMapper? mapper, [Map<String, dynamic>? map]) {
final Map<String, dynamic>? data = map ?? rawMeta;
if (data == null) return this;
// return customMapper?.call(data) as ?? AppNotificationMetadataModel.fromMap(data);
return rebuild((b) {
b.meta = mapper?.call(data);
// b.typedMeta = customMapper?.call(data) ?? AppNotificationMetadataModel.fromMap(data).toBuilder();
});
}