buildTitle method
Implementation
Widget buildTitle(BuildContext context) {
return Padding(
padding: EdgeInsetsDirectional.symmetric(
vertical: description != null ? 17 : 24,
horizontal: 16,
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
DefaultTextStyle(
style: TextStyle(
color: enabled
? Theme.of(context).colorScheme.onSurface
: Theme.of(context).disabledColor,
fontWeight: FontWeight.w600,
fontSize: 15,
),
child: title,
),
if (description != null) ...[
const SizedBox(height: 2),
DefaultTextStyle(
style: TextStyle(
color: enabled
? Theme.of(context).hintColor
: Theme.of(context).disabledColor,
fontWeight: FontWeight.w500,
fontSize: 13,
),
child: description!,
),
],
],
),
);
}