icon static method

Widget icon({
  1. required Widget child,
  2. Color? lineColor,
  3. double lineWidth = 60.0,
  4. double spacing = 16.0,
  5. double thickness = 1.0,
  6. double height = 40.0,
})

Implementation

static Widget icon({
  required Widget child,
  Color? lineColor,
  double lineWidth = 60.0,
  double spacing = 16.0,
  double thickness = 1.0,
  double height = 40.0,
}) {
  return CustomPaint(
    size: Size(double.infinity, height.h),
    painter: CenterTextDivider(
      content:
          WidgetSpan(alignment: PlaceholderAlignment.middle, child: child),
      lineColor: lineColor ?? Colors.white.withColorOpacity(0.5),
      thickness: thickness,
      spacing: spacing.w,
      lineWidth: lineWidth.w,
    ),
  );
}