Finish implementing send page
This commit is contained in:
@@ -49,19 +49,35 @@ class UI {
|
||||
}
|
||||
}
|
||||
|
||||
static Widget buttonIconOnly({
|
||||
required void Function() onPressed,
|
||||
required IconData icon,
|
||||
double? iconSize = null,
|
||||
}) {
|
||||
return IconButton(
|
||||
icon: FaIcon(icon),
|
||||
iconSize: iconSize ?? 18,
|
||||
padding: EdgeInsets.all(4),
|
||||
constraints: BoxConstraints(),
|
||||
style: ButtonStyle(tapTargetSize: MaterialTapTargetSize.shrinkWrap),
|
||||
onPressed: onPressed,
|
||||
static Widget buttonIconOnly({required void Function() onPressed, required IconData icon, double? iconSize = null, bool? square, Color? color = null, Color? iconColor = null}) {
|
||||
final style = ButtonStyle(
|
||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
backgroundColor: (color != null) ? WidgetStateProperty.resolveWith<Color?>((states) => color) : null,
|
||||
padding: (square ?? false) ? WidgetStateProperty.resolveWith<EdgeInsetsGeometry?>((states) => EdgeInsets.all(10)) : null,
|
||||
shape: (square ?? false) ? WidgetStateProperty.resolveWith<OutlinedBorder?>((states) => RoundedRectangleBorder(borderRadius: BorderRadius.circular(DefaultBorderRadius))) : null,
|
||||
);
|
||||
|
||||
if (color != null) {
|
||||
return IconButton.filled(
|
||||
icon: FaIcon(icon),
|
||||
iconSize: iconSize ?? 18,
|
||||
padding: EdgeInsets.all(4),
|
||||
constraints: BoxConstraints(),
|
||||
style: style,
|
||||
onPressed: onPressed,
|
||||
color: iconColor,
|
||||
);
|
||||
} else {
|
||||
return IconButton(
|
||||
icon: FaIcon(icon),
|
||||
iconSize: iconSize ?? 18,
|
||||
padding: EdgeInsets.all(4),
|
||||
constraints: BoxConstraints(),
|
||||
style: style,
|
||||
onPressed: onPressed,
|
||||
color: iconColor,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
static Widget buttonCard({required BuildContext context, required Widget child, required void Function() onTap, EdgeInsets? margin = null}) {
|
||||
|
||||
Reference in New Issue
Block a user