caption function
Implementation
Widget caption({
required String text,
required BuildContext context,
Color? color,
int? maxLines,
double? width,
EdgeInsetsGeometry? padding,
}) =>
Padding(
padding: padding ?? EdgeInsets.zero,
child: SizedBox(
width: width,
child: Text(
text,
style: Theme.of(context).textTheme.caption!.copyWith(
color: color ?? Colors.black,
fontWeight: FontWeight.w500,
overflow: TextOverflow.ellipsis,
fontSize: 13,
),
maxLines: maxLines,
),
),
);