Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WorkManager] Better Kotlin DSL for Data #4

Open
Tracked by #3
EdricChan03 opened this issue Jun 30, 2023 · 0 comments
Open
Tracked by #3

[WorkManager] Better Kotlin DSL for Data #4

EdricChan03 opened this issue Jun 30, 2023 · 0 comments
Labels
api request Request for a new API enhancement New feature or request

Comments

@EdricChan03
Copy link
Owner

EdricChan03 commented Jun 30, 2023

val workData = buildData {
  // Perhaps we can have similar utilities to that of a MutableMap?
  this += "key" to 123
  this += workDataOf(/* ... */) // Add existing data
  addData {
    // Add data from a Data.Builder
    putBoolean("abc", false)
  }

  this -= workDataOf(/* ... */) // Remove the mutable data's properties that are present in the specified Data
}
@EdricChan03 EdricChan03 changed the title Better Kotlin DSL for Data [WorkManager] Better Kotlin DSL for Data Jun 30, 2023
@EdricChan03 EdricChan03 added enhancement New feature or request api request Request for a new API labels Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api request Request for a new API enhancement New feature or request
Projects
Status: 🏗 In progress
Development

No branches or pull requests

1 participant