import 'package:flutter/material.dart'; import '../../../../common/theme/theme.dart'; import '../../../components/button/button.dart'; /// Layar sukses untuk tukar dan transfer. class WalletResultView extends StatelessWidget { const WalletResultView({ super.key, required this.title, required this.amountText, required this.lines, required this.onDone, }); final String title; final String amountText; final List lines; final VoidCallback onDone; @override Widget build(BuildContext context) { return SafeArea( child: Padding( padding: const EdgeInsets.all(20), child: Column( children: [ const Spacer(), const Icon(Icons.check_circle, color: AppColor.success, size: 72), const SizedBox(height: 16), Text( title, style: AppStyle.xl.copyWith(fontWeight: FontWeight.w700), textAlign: TextAlign.center, ), const SizedBox(height: 8), Text( amountText, style: AppStyle.h4.copyWith(fontWeight: FontWeight.w700), textAlign: TextAlign.center, ), const SizedBox(height: 16), ...lines.map( (line) => Padding( padding: const EdgeInsets.only(bottom: 6), child: Text( line, style: AppStyle.md.copyWith(color: AppColor.textSecondary), textAlign: TextAlign.center, ), ), ), const Spacer(), AppElevatedButton(title: 'Selesai', onPressed: onDone), ], ), ), ); } }