h2 function

Widget h2({
  1. required String text,
  2. required BuildContext context,
  3. Color? color,
  4. int? maxLines,
  5. double? width,
  6. EdgeInsetsGeometry? padding,
})

Implementation

Widget h2({
  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.headline4!.copyWith(
                color: color ?? Colors.black,
                overflow: TextOverflow.ellipsis,
              ),
          maxLines: maxLines,
        ),
      ),
    );