2022-12-21 18:03:23 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2022-12-21 19:46:50 +00:00
|
|
|
import 'package:stackwallet/pages/paynym/subwidgets/paynym_card.dart';
|
2022-12-21 18:03:23 +00:00
|
|
|
import 'package:stackwallet/utilities/featured_paynyms.dart';
|
|
|
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
|
|
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
|
|
|
|
|
|
|
class FeaturedPaynymsWidget extends StatelessWidget {
|
2022-12-21 23:02:14 +00:00
|
|
|
const FeaturedPaynymsWidget({
|
|
|
|
Key? key,
|
|
|
|
required this.walletId,
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
final String walletId;
|
2022-12-21 18:03:23 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
final entries = FeaturedPaynyms.featured.entries.toList(growable: false);
|
|
|
|
|
|
|
|
return RoundedWhiteContainer(
|
|
|
|
padding: const EdgeInsets.all(0),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
for (int i = 0; i < entries.length; i++)
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
if (i > 0)
|
|
|
|
Container(
|
|
|
|
color: Theme.of(context)
|
|
|
|
.extension<StackColors>()!
|
|
|
|
.backgroundAppBar,
|
|
|
|
height: 1,
|
|
|
|
),
|
2022-12-21 19:46:50 +00:00
|
|
|
PaynymCard(
|
2022-12-21 23:02:14 +00:00
|
|
|
walletId: walletId,
|
2022-12-21 19:46:50 +00:00
|
|
|
label: entries[i].key,
|
|
|
|
paymentCodeString: entries[i].value,
|
2022-12-21 18:03:23 +00:00
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|