mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
desktop paynym card clean up
This commit is contained in:
parent
d957cad4ba
commit
21cc545251
3 changed files with 70 additions and 66 deletions
|
@ -439,6 +439,11 @@ class _AddNewPaynymFollowViewState
|
||||||
if (_didSearch && _searchResult != null)
|
if (_didSearch && _searchResult != null)
|
||||||
RoundedWhiteContainer(
|
RoundedWhiteContainer(
|
||||||
padding: const EdgeInsets.all(0),
|
padding: const EdgeInsets.all(0),
|
||||||
|
borderColor: isDesktop
|
||||||
|
? Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.backgroundAppBar
|
||||||
|
: null,
|
||||||
child: PaynymCard(
|
child: PaynymCard(
|
||||||
label: _searchResult!.nymName,
|
label: _searchResult!.nymName,
|
||||||
paymentCodeString: _searchResult!.codes.first.code,
|
paymentCodeString: _searchResult!.codes.first.code,
|
||||||
|
|
|
@ -41,10 +41,20 @@ class FeaturedPaynymsWidget extends StatelessWidget {
|
||||||
.backgroundAppBar,
|
.backgroundAppBar,
|
||||||
height: 1,
|
height: 1,
|
||||||
),
|
),
|
||||||
PaynymCard(
|
ConditionalParent(
|
||||||
walletId: walletId,
|
condition: isDesktop,
|
||||||
label: entries[i].key,
|
builder: (child) => RoundedWhiteContainer(
|
||||||
paymentCodeString: entries[i].value,
|
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,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -4,9 +4,7 @@ import 'package:stackwallet/utilities/format.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.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/utilities/util.dart';
|
||||||
import 'package:stackwallet/widgets/conditional_parent.dart';
|
|
||||||
import 'package:stackwallet/widgets/custom_buttons/paynym_follow_toggle_button.dart';
|
import 'package:stackwallet/widgets/custom_buttons/paynym_follow_toggle_button.dart';
|
||||||
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
|
||||||
|
|
||||||
class PaynymCard extends StatefulWidget {
|
class PaynymCard extends StatefulWidget {
|
||||||
const PaynymCard({
|
const PaynymCard({
|
||||||
|
@ -29,67 +27,58 @@ class _PaynymCardState extends State<PaynymCard> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ConditionalParent(
|
return Padding(
|
||||||
condition: isDesktop,
|
padding: isDesktop
|
||||||
builder: (child) => RoundedWhiteContainer(
|
? const EdgeInsets.symmetric(
|
||||||
padding: const EdgeInsets.all(0),
|
vertical: 16,
|
||||||
borderColor:
|
horizontal: 20,
|
||||||
Theme.of(context).extension<StackColors>()!.backgroundAppBar,
|
)
|
||||||
child: child,
|
: const EdgeInsets.all(12),
|
||||||
),
|
child: Row(
|
||||||
child: Padding(
|
children: [
|
||||||
padding: isDesktop
|
PayNymBot(
|
||||||
? const EdgeInsets.symmetric(
|
size: 32,
|
||||||
vertical: 16,
|
paymentCodeString: widget.paymentCodeString,
|
||||||
horizontal: 20,
|
),
|
||||||
)
|
const SizedBox(
|
||||||
: const EdgeInsets.all(12),
|
width: 12,
|
||||||
child: Row(
|
),
|
||||||
children: [
|
Expanded(
|
||||||
PayNymBot(
|
child: Column(
|
||||||
size: 32,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
paymentCodeString: widget.paymentCodeString,
|
children: [
|
||||||
|
Text(
|
||||||
|
widget.label,
|
||||||
|
style: isDesktop
|
||||||
|
? STextStyles.desktopTextExtraExtraSmall(context)
|
||||||
|
.copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textFieldActiveText,
|
||||||
|
)
|
||||||
|
: STextStyles.w500_12(context),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 2,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
Format.shorten(widget.paymentCodeString, 12, 5),
|
||||||
|
style: isDesktop
|
||||||
|
? STextStyles.desktopTextExtraExtraSmall(context)
|
||||||
|
: STextStyles.w500_12(context).copyWith(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textSubtitle1,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(
|
),
|
||||||
width: 12,
|
PaynymFollowToggleButton(
|
||||||
),
|
walletId: widget.walletId,
|
||||||
Expanded(
|
paymentCodeStringToFollow: widget.paymentCodeString,
|
||||||
child: Column(
|
),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
],
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
widget.label,
|
|
||||||
style: isDesktop
|
|
||||||
? STextStyles.desktopTextExtraExtraSmall(context)
|
|
||||||
.copyWith(
|
|
||||||
color: Theme.of(context)
|
|
||||||
.extension<StackColors>()!
|
|
||||||
.textFieldActiveText,
|
|
||||||
)
|
|
||||||
: STextStyles.w500_12(context),
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: 2,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
Format.shorten(widget.paymentCodeString, 12, 5),
|
|
||||||
style: isDesktop
|
|
||||||
? STextStyles.desktopTextExtraExtraSmall(context)
|
|
||||||
: STextStyles.w500_12(context).copyWith(
|
|
||||||
color: Theme.of(context)
|
|
||||||
.extension<StackColors>()!
|
|
||||||
.textSubtitle1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
PaynymFollowToggleButton(
|
|
||||||
walletId: widget.walletId,
|
|
||||||
paymentCodeStringToFollow: widget.paymentCodeString,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue