Skip to content
This repository was archived by the owner on Jun 16, 2026. It is now read-only.
This repository was archived by the owner on Jun 16, 2026. It is now read-only.

Create User and Breadcrumb data classes from a Map #59

Description

@marandaneto

Often Hybrid SDKs have to create data classes out of a Map, See:

https://github.com/getsentry/sentry-dart/blob/b8b9b7b2608c35e4a3f7340ae9d2f0e9c06d984f/flutter/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt#L272-L286

This code is repeated for Android and iOS, on Flutter, RN, and others.
Ideally, Android and iOS would expose extension methods for this, such as:

User.fromMap(Map<String, Any> user).
Breadcrumb.fromMap(Map<String, Any> crumb).

### Build in Core SDKs
- [ ] https://github.com/getsentry/sentry-cocoa/issues/2687
- [ ] https://github.com/getsentry/sentry-java/issues/2534
### Use in Hybrid SDKs
- [x] [Flutter](https://github.com/getsentry/sentry-dart/issues/1330)
- [ ] https://github.com/getsentry/sentry-react-native/issues/4373

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions