nank1ro / solidart

Signals in Dart and Flutter, inspired by SolidJS
https://docs.page/nank1ro/solidart
MIT License
155 stars 5 forks source link

feat: solid maybe get #65

Closed nank1ro closed 11 months ago

nank1ro commented 11 months ago

Add the method maybeGet() to the Solid widget to get a provider. If the provider can't be found, returns null instead of throwing like get() does

codecov[bot] commented 11 months ago

Codecov Report

Merging #65 (a74eab2) into main (6f3e882) will not change coverage. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/nank1ro/solidart/pull/65/graphs/tree.svg?width=650&height=150&src=pr&token=HvJYtaixiW&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti)](https://app.codecov.io/gh/nank1ro/solidart/pull/65?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti) ```diff @@ Coverage Diff @@ ## main #65 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 17 17 Lines 769 774 +5 ========================================= + Hits 769 774 +5 ``` | [Files](https://app.codecov.io/gh/nank1ro/solidart/pull/65?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti) | Coverage Δ | | |---|---|---| | [...utter\_solidart/lib/src/utils/solid\_extensions.dart](https://app.codecov.io/gh/nank1ro/solidart/pull/65?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti#diff-cGFja2FnZXMvZmx1dHRlcl9zb2xpZGFydC9saWIvc3JjL3V0aWxzL3NvbGlkX2V4dGVuc2lvbnMuZGFydA==) | `100.00% <100.00%> (ø)` | | | [...ckages/flutter\_solidart/lib/src/widgets/solid.dart](https://app.codecov.io/gh/nank1ro/solidart/pull/65?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Alexandru+Mariuti#diff-cGFja2FnZXMvZmx1dHRlcl9zb2xpZGFydC9saWIvc3JjL3dpZGdldHMvc29saWQuZGFydA==) | `100.00% <100.00%> (ø)` | |