adaptiveStream and dynacast option in example

This commit is contained in:
Hiroshi Horie
2022-04-03 00:18:28 +09:00
parent 2f6042ef94
commit 91b604a191
2 changed files with 65 additions and 16 deletions
+14 -9
View File
@@ -57,15 +57,20 @@ class LiveKitTheme {
checkColor: MaterialStateProperty.all(Colors.white),
fillColor: MaterialStateProperty.all(accentColor),
),
// switchTheme: SwitchThemeData(
// trackColor: MaterialStateProperty.resolveWith((states) {
// print('states: $states');
// if (states.contains(MaterialState.disabled)) {
// return Colors.red;
// }
// return accentColor;
// }),
// ),
switchTheme: SwitchThemeData(
trackColor: MaterialStateProperty.resolveWith((states) {
if (states.contains(MaterialState.selected)) {
return accentColor;
}
return accentColor.withOpacity(0.3);
}),
thumbColor: MaterialStateProperty.resolveWith((states) {
if (states.contains(MaterialState.selected)) {
return Colors.white;
}
return Colors.white.withOpacity(0.3);
}),
),
dialogTheme: DialogTheme(
backgroundColor: cardColor,
shape: RoundedRectangleBorder(