sentToRow method
"OTP sent to: …" chip with the "Change" link beside it, like
the web widget's row under the header.
onChange null hides the link (verified state).
Implementation
Widget sentToRow({required String target, VoidCallback? onChange}) {
return Wrap(
alignment: WrapAlignment.center,
crossAxisAlignment: WrapCrossAlignment.center,
spacing: 10,
runSpacing: 4,
children: [
Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
decoration: BoxDecoration(
color: theme.primary.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(7),
),
child: Text(
'OTP sent to: $target',
style: TextStyle(
fontFamily: fontFamily,
fontSize: 13,
fontWeight: FontWeight.w600,
color: theme.primary,
),
),
),
if (onChange != null)
InkWell(
onTap: onChange,
borderRadius: BorderRadius.circular(4),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 2, vertical: 4),
child: Text(
'Change',
style: TextStyle(
fontFamily: fontFamily,
fontSize: 14,
color: theme.primary,
decoration: TextDecoration.underline,
decorationColor: theme.primary,
),
),
),
),
],
);
}