Fix gradient on GradientFloatingActionButton
This commit is contained in:
parent
5dcc13236b
commit
5c6c211bd0
1 changed files with 2 additions and 1 deletions
|
|
@ -27,6 +27,7 @@ import androidx.compose.ui.draw.drawBehind
|
||||||
import androidx.compose.ui.geometry.Offset
|
import androidx.compose.ui.geometry.Offset
|
||||||
import androidx.compose.ui.geometry.Size
|
import androidx.compose.ui.geometry.Size
|
||||||
import androidx.compose.ui.geometry.center
|
import androidx.compose.ui.geometry.center
|
||||||
|
import androidx.compose.ui.graphics.BlendMode
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.graphics.LinearGradientShader
|
import androidx.compose.ui.graphics.LinearGradientShader
|
||||||
import androidx.compose.ui.graphics.RadialGradientShader
|
import androidx.compose.ui.graphics.RadialGradientShader
|
||||||
|
|
@ -97,8 +98,8 @@ fun GradientFloatingActionButton(
|
||||||
.graphicsLayer(shape = shape, clip = false)
|
.graphicsLayer(shape = shape, clip = false)
|
||||||
.clip(shape)
|
.clip(shape)
|
||||||
.drawBehind {
|
.drawBehind {
|
||||||
drawRect(brush = radialShaderBrush, alpha = 0.4f)
|
|
||||||
drawRect(brush = linearShaderBrush)
|
drawRect(brush = linearShaderBrush)
|
||||||
|
drawRect(brush = radialShaderBrush, alpha = 0.4f, blendMode = BlendMode.Overlay)
|
||||||
}
|
}
|
||||||
.clickable(
|
.clickable(
|
||||||
enabled = true,
|
enabled = true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue