feat:增加待办排序UI功能
This commit is contained in:
@@ -213,6 +213,41 @@ Widget buildToggleSwitch<T extends Enum>({
|
||||
);
|
||||
}
|
||||
|
||||
ButtonStyle buildSegmentStyle(ColorScheme colors) {
|
||||
return ButtonStyle(
|
||||
side: WidgetStateProperty.all<BorderSide>(
|
||||
const BorderSide(color: Colors.transparent, width: 0),
|
||||
),
|
||||
iconColor: WidgetStateProperty.resolveWith<Color>(
|
||||
(Set<WidgetState> states) {
|
||||
if (states.contains(WidgetState.selected)) {
|
||||
return colors.onPrimary;
|
||||
}
|
||||
return Colors.grey;
|
||||
},
|
||||
),
|
||||
backgroundColor: WidgetStateProperty.resolveWith<Color>((
|
||||
Set<WidgetState> states,
|
||||
) {
|
||||
if (states.contains(WidgetState.selected)) {
|
||||
return colors.primary;
|
||||
}
|
||||
return Colors.grey.shade200;
|
||||
}),
|
||||
foregroundColor: WidgetStateProperty.resolveWith<Color>((
|
||||
Set<WidgetState> states,
|
||||
) {
|
||||
if (states.contains(WidgetState.selected)) {
|
||||
return colors.onPrimary;
|
||||
}
|
||||
return colors.onSurface;
|
||||
}),
|
||||
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
|
||||
RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget circleIconButton({
|
||||
required IconData icon,
|
||||
required VoidCallback onPressed,
|
||||
|
||||
Reference in New Issue
Block a user