title method

Widget? title(
  1. BuildContext context
)

Implementation

Widget? title(BuildContext context) {
  if (_titleWidget != null) return _titleWidget;
  if (titleText != null) {
    return Row(
      children: [
        if (titleIcon != null) ...[
          titleIcon!,
          const SizedBox(width: 8),
        ],
        Expanded(
          child: Text(
            titleText!,
            textAlign: TextAlign.left,
            style: DigitTheme.instance.mobileTheme.textTheme.headlineMedium,
          ),
        ),
        if (isCloseIcon)
          InkWell(
            onTap: () => Navigator.of(context).pop(),
            child: const Icon(Icons.close),
          ),
      ],
    );
  }
  return null;
}