attach method
Implementation
@override
Widget? attach(context, controller) {
var mTT = context.textTheme;
return Opacity(
opacity: controller.enabled ? 1 : 0.5,
child: AndrossySetting(
background: Colors.transparent,
rippleColor: Colors.transparent,
pressedColor: Colors.transparent,
padding: contentPadding,
header: AndrossyText(
text: controller.title,
textStyle: controller.titleStyle ?? mTT.titleMedium,
),
body: AndrossyText(
visibility: controller.summary?.isNotEmpty ?? false,
text: controller.summary,
textStyle: controller.summaryStyle ?? mTT.titleSmall,
),
leading: _Icon(
visibility: controller.icon != null,
icon: controller.icon,
size: controller.iconSize ?? context.iconTheme.size ?? 24,
tint: controller.iconTint ?? context.iconTheme.color,
margin: const EdgeInsets.only(right: 24),
),
tailing: controller.type == SettingsViewType.none
? null
: Padding(
padding: const EdgeInsets.only(left: 16.0),
child: SettingsTailingView(controller: controller),
),
),
);
}