mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: inative background color
This commit is contained in:
parent
07f300f032
commit
7295554355
@ -27,7 +27,7 @@ class Toggle extends StatelessWidget {
|
|||||||
height: style.height,
|
height: style.height,
|
||||||
width: style.width,
|
width: style.width,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: style.backgroundColor,
|
color: value ? style.activeBackgroundColor : style.inactiveBackgroundColor,
|
||||||
borderRadius: BorderRadius.circular(style.height / 2),
|
borderRadius: BorderRadius.circular(style.height / 2),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -7,29 +7,32 @@ class ToggleStyle {
|
|||||||
final double width;
|
final double width;
|
||||||
|
|
||||||
final double thumbRadius;
|
final double thumbRadius;
|
||||||
|
|
||||||
final Color backgroundColor;
|
|
||||||
final Color thumbColor;
|
final Color thumbColor;
|
||||||
|
final Color activeBackgroundColor;
|
||||||
|
final Color inactiveBackgroundColor;
|
||||||
|
|
||||||
ToggleStyle({
|
ToggleStyle({
|
||||||
required this.height,
|
required this.height,
|
||||||
required this.width,
|
required this.width,
|
||||||
required this.thumbRadius,
|
required this.thumbRadius,
|
||||||
required this.backgroundColor,
|
|
||||||
required this.thumbColor,
|
required this.thumbColor,
|
||||||
|
required this.activeBackgroundColor,
|
||||||
|
required this.inactiveBackgroundColor,
|
||||||
});
|
});
|
||||||
|
|
||||||
ToggleStyle.big(AppTheme theme)
|
ToggleStyle.big(AppTheme theme)
|
||||||
: height = 16,
|
: height = 16,
|
||||||
width = 27,
|
width = 27,
|
||||||
thumbRadius = 14,
|
thumbRadius = 14,
|
||||||
backgroundColor = theme.main1,
|
activeBackgroundColor = theme.main1,
|
||||||
|
inactiveBackgroundColor = theme.shader5,
|
||||||
thumbColor = theme.surface;
|
thumbColor = theme.surface;
|
||||||
|
|
||||||
ToggleStyle.small(AppTheme theme)
|
ToggleStyle.small(AppTheme theme)
|
||||||
: height = 10,
|
: height = 10,
|
||||||
width = 16,
|
width = 16,
|
||||||
thumbRadius = 8,
|
thumbRadius = 8,
|
||||||
backgroundColor = theme.main1,
|
activeBackgroundColor = theme.main1,
|
||||||
|
inactiveBackgroundColor = theme.shader5,
|
||||||
thumbColor = theme.surface;
|
thumbColor = theme.surface;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user