support primary color
This commit is contained in:
1 parent
595ee6fd6a
commit
90f53a0578
3 files changed
+39
-15
No files matched your search
@@ -41,13 +41,13 @@ class EasyButton extends StatelessWidget {
|
||||
if (states.contains(MaterialState.disabled)) {
|
||||
return Colors.grey.withOpacity(0.5);
|
||||
}
|
||||
return color ?? (type == ButtonType.secondary ? Colors.white : Colors.blue);
|
||||
return color ?? (type == ButtonType.secondary ? Colors.white : Theme.of(context).primaryColor);
|
||||
}),
|
||||
foregroundColor: MaterialStateProperty.resolveWith<Color>((Set<MaterialState> states) {
|
||||
if (states.contains(MaterialState.disabled)) {
|
||||
return Colors.grey.withOpacity(0.1);
|
||||
}
|
||||
return color ?? (type == ButtonType.secondary ? Colors.white : Colors.blue);
|
||||
return color ?? (type == ButtonType.secondary ? Colors.white : Theme.of(context).primaryColor);
|
||||
}),
|
||||
minimumSize: MaterialStateProperty.all(Size(minWidth, height)),
|
||||
shape: MaterialStateProperty.all(
|
||||
|
||||
Reference in new issue
Block a user