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

child should be removed in favor of value<T> #36

Open
stargazing-dino opened this issue Jul 20, 2022 · 0 comments
Open

child should be removed in favor of value<T> #36

stargazing-dino opened this issue Jul 20, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@stargazing-dino
Copy link
Owner

If you want to be able to do a SlidableAction you can't because it takes in raw strings and IconData:

            SlidableAction(
              label: StringsResource.systemRemove, // String
              backgroundColor: colors.eventLevel4,
              icon: icons.delete, // IconData
              onPressed: (context) async {
                await maybeOnDeleteDevice();
              },
            ),

Instead our buttonBuilder should be

AsyncButtonBuilder<T>(
  value: T,
  loadingValue: T,
  builder: (context, T value, _, __) {
    // ...
  },
)

We can do an internal check to see if the type is a Widget and provide defaults such as loading widgets etc.

I'm not sure on this though I'll let it settle in my mind.

@stargazing-dino stargazing-dino added the enhancement New feature or request label Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant