Comments (3)
Could even simplify it further to:
fun CoilImage(
image: @Composable ((RequestResult) -> Unit) = {
if (it is SuccessResult) {
Image(it.image)
}
}
)
This has the benefit in that you could very easily through your own crossfade/transition between success/error.
from accompanist.
I am actually thinking of converting getSuccessPainter
and getFailurePainter
to simply:
fun CoilImage(
image: @Composable ((SuccessResult) -> Unit) = { Image(it.image) },
error: @Composable ((ErrorResult) -> Unit)? = null,
)
This would also simplify the crossfade implementation. Sounds like this would work?
from accompanist.
Looks very nice for me!
from accompanist.
Related Issues (20)
- [WebView] Flickering when used inside a HorizontalPager HOT 1
- [Pager] Pages do not get disposed. HOT 1
- [System UI Controller] Can calls to show/hide system ui be idempotent? HOT 1
- [System UI Controller] Document migration path
- [Navigation Material] bottomSheet backstack not work HOT 3
- Landroidx/compose/material/ModalBottomSheetKt; or its super classes HOT 3
- 0.33.1-alpha is not compatible with compose 1.6.0-alpha06 or later HOT 2
- [System UI Controller] Deprecation and Activity.enableEdgeToEdge HOT 9
- Question: Dismiss bottom sheet programmatically? HOT 2
- [WebView] In Android 13, Compose Accompanist WebView is initially zoomed. HOT 5
- When view the dialog in Compose Immersive mode, the system bar appears. HOT 2
- [Permissions] Pass PermissionStatus instead of boolean to onPermissionResult HOT 6
- [Test Harness]
- [Navigation Material] onResume/onPause lifecycle events are not received for bottomSheet destination HOT 1
- [Navigation Material] Incorrect back behavior with nested navigator HOT 2
- Stop [Permissions]
- Incorrect behaviour when bottom sheet is closed by clicking on its background HOT 3
- [Navigation Material] HOT 1
- [BottomSheetNavigator] NullPointerException (race-condition?) when using back button HOT 6
- [WebView] Doesn't save state when recycled in a LazyColumn HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from accompanist.