Files
enaklo-flutter/lib/presentation/pages/wallet/widgets/wallet_result_view.dart
T

61 lines
1.7 KiB
Dart
Raw Normal View History

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<String> 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),
],
),
),
);
}
}