mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-27 13:59:21 +00:00
75 lines
2.2 KiB
Dart
75 lines
2.2 KiB
Dart
/*
|
|
* This file is part of Stack Wallet.
|
|
*
|
|
* Copyright (c) 2023 Cypher Stack
|
|
* All Rights Reserved.
|
|
* The code is distributed under GPLv3 license, see LICENSE file for details.
|
|
* Generated by Cypher Stack on 2023-05-26
|
|
*
|
|
*/
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'paynym_card.dart';
|
|
import '../../../themes/stack_colors.dart';
|
|
import '../../../utilities/featured_paynyms.dart';
|
|
import '../../../utilities/util.dart';
|
|
import '../../../widgets/conditional_parent.dart';
|
|
import '../../../widgets/rounded_white_container.dart';
|
|
|
|
class FeaturedPaynymsWidget extends StatelessWidget {
|
|
const FeaturedPaynymsWidget({
|
|
super.key,
|
|
required this.walletId,
|
|
});
|
|
|
|
final String walletId;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final entries = FeaturedPaynyms.featured.entries.toList(growable: false);
|
|
final isDesktop = Util.isDesktop;
|
|
|
|
return ConditionalParent(
|
|
condition: !isDesktop,
|
|
builder: (child) => RoundedWhiteContainer(
|
|
padding: const EdgeInsets.all(0),
|
|
child: child,
|
|
),
|
|
child: Column(
|
|
children: [
|
|
for (int i = 0; i < entries.length; i++)
|
|
Column(
|
|
children: [
|
|
if (i > 0)
|
|
isDesktop
|
|
? const SizedBox(
|
|
height: 10,
|
|
)
|
|
: Container(
|
|
color: Theme.of(context)
|
|
.extension<StackColors>()!
|
|
.backgroundAppBar,
|
|
height: 1,
|
|
),
|
|
ConditionalParent(
|
|
condition: isDesktop,
|
|
builder: (child) => RoundedWhiteContainer(
|
|
padding: const EdgeInsets.all(0),
|
|
borderColor: Theme.of(context)
|
|
.extension<StackColors>()!
|
|
.backgroundAppBar,
|
|
child: child,
|
|
),
|
|
child: PaynymCard(
|
|
walletId: walletId,
|
|
label: entries[i].key,
|
|
paymentCodeString: entries[i].value,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|