buildTitle method
Implementation
Widget buildTitle(BuildContext context) {
return Padding(
padding: EdgeInsetsDirectional.symmetric(vertical: 14, 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.w500,
fontSize: 15,
),
child: title,
),
if (description != null) ...[
const SizedBox(height: 3),
DefaultTextStyle(
style: TextStyle(
color: enabled
? Theme.of(context).colorScheme.onSurfaceVariant
: Theme.of(context).disabledColor,
fontSize: 14,
),
child: description!,
),
],
],
),
);
}