mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 20:54:33 +00:00
featured paynyms conditional desktop modification
This commit is contained in:
parent
97d3b35a22
commit
b0b2ad14f5
1 changed files with 19 additions and 8 deletions
|
@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:stackwallet/pages/paynym/subwidgets/paynym_card.dart';
|
import 'package:stackwallet/pages/paynym/subwidgets/paynym_card.dart';
|
||||||
import 'package:stackwallet/utilities/featured_paynyms.dart';
|
import 'package:stackwallet/utilities/featured_paynyms.dart';
|
||||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
|
import 'package:stackwallet/widgets/conditional_parent.dart';
|
||||||
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
|
|
||||||
class FeaturedPaynymsWidget extends StatelessWidget {
|
class FeaturedPaynymsWidget extends StatelessWidget {
|
||||||
|
@ -15,21 +17,30 @@ class FeaturedPaynymsWidget extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final entries = FeaturedPaynyms.featured.entries.toList(growable: false);
|
final entries = FeaturedPaynyms.featured.entries.toList(growable: false);
|
||||||
|
final isDesktop = Util.isDesktop;
|
||||||
|
|
||||||
return RoundedWhiteContainer(
|
return ConditionalParent(
|
||||||
padding: const EdgeInsets.all(0),
|
condition: !isDesktop,
|
||||||
|
builder: (child) => RoundedWhiteContainer(
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
|
child: child,
|
||||||
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
for (int i = 0; i < entries.length; i++)
|
for (int i = 0; i < entries.length; i++)
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
Container(
|
isDesktop
|
||||||
color: Theme.of(context)
|
? const SizedBox(
|
||||||
.extension<StackColors>()!
|
height: 10,
|
||||||
.backgroundAppBar,
|
)
|
||||||
height: 1,
|
: Container(
|
||||||
),
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.backgroundAppBar,
|
||||||
|
height: 1,
|
||||||
|
),
|
||||||
PaynymCard(
|
PaynymCard(
|
||||||
walletId: walletId,
|
walletId: walletId,
|
||||||
label: entries[i].key,
|
label: entries[i].key,
|
||||||
|
|
Loading…
Reference in a new issue