Is your feature request related to a problem? Please describe.
The name of the extension function error for the ImageRequest.Builder class is confusing. I'm using Coil in a view-based Android project. I was using the ImageView.load function inside of a fragment and would use error(@DrawableRes drawableResId: Int). But since it's an extension function, it requires importing. When I was writing code, the IDEA automatically imported the error(message: Any) function from Kotlin stdlib, which throws IllegalStateException and causes a runtime exception.
Describe the solution you'd like
Could the error function be renamed to onError? Or the library should include a lint check that warns the user when there is an error(message: Any) function (from stdlib) usage in the context of ImageRequest.Builder class.
Is your feature request related to a problem? Please describe.
The name of the extension function
errorfor theImageRequest.Builderclass is confusing. I'm using Coil in a view-based Android project. I was using theImageView.loadfunction inside of a fragment and would useerror(@DrawableRes drawableResId: Int). But since it's an extension function, it requires importing. When I was writing code, the IDEA automatically imported theerror(message: Any)function from Kotlin stdlib, which throws IllegalStateException and causes a runtime exception.Describe the solution you'd like
Could the
errorfunction be renamed toonError? Or the library should include a lint check that warns the user when there is anerror(message: Any)function (from stdlib) usage in the context ofImageRequest.Builderclass.