show green "connected" in paynym details ui

This commit is contained in:
julian 2023-01-31 17:46:30 -06:00
parent 19bf4c0df6
commit 7e05abec43
3 changed files with 109 additions and 6 deletions

View file

@ -181,9 +181,44 @@ class _PaynymDetailsPopupState extends ConsumerState<PaynymDetailsPopup> {
const SizedBox(
width: 12,
),
Text(
widget.accountLite.nymName,
style: STextStyles.w600_12(context),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
widget.accountLite.nymName,
style: STextStyles.w600_12(context),
),
FutureBuilder(
future:
wallet.hasConnected(widget.accountLite.code),
builder: (context, AsyncSnapshot<bool> snapshot) {
if (snapshot.connectionState ==
ConnectionState.done &&
snapshot.data == true) {
return Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
const SizedBox(
height: 2,
),
Text(
"Connected",
style: STextStyles.w500_10(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.accentColorGreen,
),
)
],
);
} else {
return Container();
}
},
),
],
),
],
),

View file

@ -176,9 +176,42 @@ class _PaynymDetailsPopupState extends ConsumerState<DesktopPaynymDetails> {
const SizedBox(
width: 12,
),
Text(
widget.accountLite.nymName,
style: STextStyles.desktopTextSmall(context),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
widget.accountLite.nymName,
style: STextStyles.desktopTextSmall(context),
),
FutureBuilder(
future: wallet.hasConnected(widget.accountLite.code),
builder: (context, AsyncSnapshot<bool> snapshot) {
if (snapshot.connectionState ==
ConnectionState.done &&
snapshot.data == true) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(
height: 2,
),
Text(
"Connected",
style: STextStyles.desktopTextSmall(context)
.copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.accentColorGreen,
),
)
],
);
} else {
return Container();
}
},
),
],
),
],
),

View file

@ -967,6 +967,41 @@ class STextStyles {
}
}
static TextStyle w500_10(BuildContext context) {
switch (_theme(context).themeType) {
case ThemeType.light:
return GoogleFonts.inter(
color: _theme(context).textDark,
fontWeight: FontWeight.w500,
fontSize: 10,
);
case ThemeType.oceanBreeze:
return GoogleFonts.inter(
color: _theme(context).textDark,
fontWeight: FontWeight.w500,
fontSize: 10,
);
case ThemeType.dark:
return GoogleFonts.inter(
color: _theme(context).textDark,
fontWeight: FontWeight.w500,
fontSize: 10,
);
case ThemeType.oledBlack:
return GoogleFonts.inter(
color: _theme(context).textDark,
fontWeight: FontWeight.w500,
fontSize: 10,
);
case ThemeType.fruitSorbet:
return GoogleFonts.inter(
color: _theme(context).textDark,
fontWeight: FontWeight.w500,
fontSize: 10,
);
}
}
static TextStyle syncPercent(BuildContext context) {
switch (_theme(context).themeType) {
case ThemeType.light: