mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 20:09:23 +00:00
fixed tor status text
This commit is contained in:
parent
b5fcea18f6
commit
11b7456855
1 changed files with 51 additions and 17 deletions
|
@ -35,28 +35,62 @@ class TorSettingsView extends ConsumerStatefulWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _TorSettingsViewState extends ConsumerState<TorSettingsView> {
|
class _TorSettingsViewState extends ConsumerState<TorSettingsView> {
|
||||||
|
TorSyncStatus _networkStatus = TorSyncStatus.unableToSync;
|
||||||
|
|
||||||
Widget _buildTorIcon(TorSyncStatus status) {
|
Widget _buildTorIcon(TorSyncStatus status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case TorSyncStatus.unableToSync:
|
case TorSyncStatus.unableToSync:
|
||||||
return SvgPicture.asset(
|
return Stack(
|
||||||
|
alignment: AlignmentDirectional.center,
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
Assets.svg.tor,
|
Assets.svg.tor,
|
||||||
color: Theme.of(context).extension<StackColors>()!.textSubtitle3,
|
color: Theme.of(context).extension<StackColors>()!.textSubtitle3,
|
||||||
width: 200,
|
width: 200,
|
||||||
height: 200,
|
height: 200,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"CONNECT",
|
||||||
|
style: STextStyles.smallMed14(context).copyWith(
|
||||||
|
color: Theme.of(context).extension<StackColors>()!.popupBG),
|
||||||
|
)
|
||||||
|
],
|
||||||
);
|
);
|
||||||
case TorSyncStatus.synced:
|
case TorSyncStatus.synced:
|
||||||
return SvgPicture.asset(
|
return Stack(
|
||||||
|
alignment: AlignmentDirectional.center,
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
Assets.svg.tor,
|
Assets.svg.tor,
|
||||||
color: Theme.of(context).extension<StackColors>()!.accentColorGreen,
|
color:
|
||||||
|
Theme.of(context).extension<StackColors>()!.accentColorGreen,
|
||||||
width: 200,
|
width: 200,
|
||||||
height: 200,
|
height: 200,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"CONNECTED",
|
||||||
|
style: STextStyles.smallMed14(context).copyWith(
|
||||||
|
color: Theme.of(context).extension<StackColors>()!.popupBG),
|
||||||
|
)
|
||||||
|
],
|
||||||
);
|
);
|
||||||
case TorSyncStatus.syncing:
|
case TorSyncStatus.syncing:
|
||||||
return SvgPicture.asset(
|
return Stack(
|
||||||
|
alignment: AlignmentDirectional.center,
|
||||||
|
children: [
|
||||||
|
SvgPicture.asset(
|
||||||
Assets.svg.tor,
|
Assets.svg.tor,
|
||||||
color: Theme.of(context).extension<StackColors>()!.accentColorYellow,
|
color:
|
||||||
|
Theme.of(context).extension<StackColors>()!.accentColorYellow,
|
||||||
width: 200,
|
width: 200,
|
||||||
height: 200,
|
height: 200,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"CONNECTING",
|
||||||
|
style: STextStyles.smallMed14(context).copyWith(
|
||||||
|
color: Theme.of(context).extension<StackColors>()!.popupBG),
|
||||||
|
)
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,7 +191,7 @@ class _TorSettingsViewState extends ConsumerState<TorSettingsView> {
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(10.0),
|
padding: const EdgeInsets.all(10.0),
|
||||||
child: _buildTorIcon(TorSyncStatus.syncing),
|
child: _buildTorIcon(_networkStatus),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -174,7 +208,7 @@ class _TorSettingsViewState extends ConsumerState<TorSettingsView> {
|
||||||
style: STextStyles.titleBold12(context),
|
style: STextStyles.titleBold12(context),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
_buildTorStatus(TorSyncStatus.syncing),
|
_buildTorStatus(_networkStatus),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue