mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-24 23:15:35 -04:00
deadlock cleanup
This commit is contained in:
parent
23867a1784
commit
2141dbff21
40 changed files with 254 additions and 253 deletions
|
@ -84,6 +84,24 @@ class ScaleTheme extends ThemeExtension<ScaleTheme> {
|
|||
scheme.primaryScale.borderText, scheme.primaryScale.primary, 0.25);
|
||||
});
|
||||
|
||||
WidgetStateProperty<Color?> checkboxFillColorWidgetStateProperty() =>
|
||||
WidgetStateProperty.resolveWith((states) {
|
||||
if (states.contains(WidgetState.selected)) {
|
||||
if (states.contains(WidgetState.disabled)) {
|
||||
return scheme.grayScale.primary.withAlpha(0x7F);
|
||||
} else if (states.contains(WidgetState.pressed)) {
|
||||
return scheme.primaryScale.hoverBorder;
|
||||
} else if (states.contains(WidgetState.hovered)) {
|
||||
return scheme.primaryScale.hoverBorder;
|
||||
} else if (states.contains(WidgetState.focused)) {
|
||||
return scheme.primaryScale.border;
|
||||
}
|
||||
return scheme.primaryScale.border;
|
||||
} else {
|
||||
return Colors.transparent;
|
||||
}
|
||||
});
|
||||
|
||||
// WidgetStateProperty<Color?> elementBackgroundWidgetStateProperty() {
|
||||
// return null;
|
||||
// }
|
||||
|
@ -140,7 +158,7 @@ class ScaleTheme extends ThemeExtension<ScaleTheme> {
|
|||
appBarTheme: baseThemeData.appBarTheme.copyWith(
|
||||
backgroundColor: scheme.primaryScale.border,
|
||||
foregroundColor: scheme.primaryScale.borderText,
|
||||
toolbarHeight: 40,
|
||||
toolbarHeight: 48,
|
||||
),
|
||||
bottomSheetTheme: baseThemeData.bottomSheetTheme.copyWith(
|
||||
elevation: 0,
|
||||
|
@ -150,6 +168,11 @@ class ScaleTheme extends ThemeExtension<ScaleTheme> {
|
|||
topLeft: Radius.circular(16 * config.borderRadiusScale),
|
||||
topRight: Radius.circular(16 * config.borderRadiusScale)))),
|
||||
canvasColor: scheme.primaryScale.subtleBackground,
|
||||
checkboxTheme: baseThemeData.checkboxTheme.copyWith(
|
||||
side: BorderSide(color: scheme.primaryScale.border, width: 2),
|
||||
checkColor: elementColorWidgetStateProperty(),
|
||||
fillColor: checkboxFillColorWidgetStateProperty(),
|
||||
),
|
||||
chipTheme: baseThemeData.chipTheme.copyWith(
|
||||
backgroundColor: scheme.primaryScale.elementBackground,
|
||||
selectedColor: scheme.primaryScale.activeElementBackground,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue