renderMobileView method

dynamic renderMobileView(
  1. BuildContext context,
  2. CustomDividor state
)

Implementation

renderMobileView(BuildContext context, CustomDividor state) {
  return Column(
    children: [
      Row(
        children: (state.title != '')
            ? [
                Expanded(
                  child: Divider(
                    color: state.color?.withValues(alpha: 0.3) ?? Colors.white.withValues(alpha: 0.6),
                    thickness: 1,
                    indent: 3,
                    endIndent: 3,
                  ),
                ),
                Padding(
                  padding: const EdgeInsets.symmetric(horizontal: 3),
                  child: Text(
                    state.title,
                    style: TextStyle(
                      fontSize: state.fontSize,
                      color: state.color ?? Colors.white.withValues(alpha: 0.6),
                    ),
                  ),
                ),
                Expanded(
                  child: Divider(
                    color: state.color?.withValues(alpha: 0.3) ?? Colors.white.withValues(alpha: 0.6),
                    thickness: 1,
                    indent: 3,
                    endIndent: 3,
                  ),
                )
              ]
            : [
                Expanded(
                  child: Divider(
                    color: state.color ?? Colors.white.withValues(alpha: 0.3),
                    thickness: 1,
                    indent: 3,
                    endIndent: 3,
                  ),
                )
              ],
      ),
      if (state.bottomSpacing != null) SizedBox(height: state.bottomSpacing)
    ],
  );
}