desktop about ui fix

This commit is contained in:
ryleedavis 2022-11-07 16:17:54 -07:00
parent e41f8088b0
commit 43deb9f81f

View file

@ -140,6 +140,9 @@ class DesktopAboutView extends ConsumerWidget {
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.fromLTRB(24, 10, 24, 35), padding: const EdgeInsets.fromLTRB(24, 10, 24, 35),
child: Row(
children: [
Expanded(
child: RoundedWhiteContainer( child: RoundedWhiteContainer(
width: 929, width: 929,
height: 411, height: 411,
@ -169,7 +172,8 @@ class DesktopAboutView extends ConsumerWidget {
TextSpan( TextSpan(
text: text:
"By using Stack Wallet, you agree to the ", "By using Stack Wallet, you agree to the ",
style: STextStyles.desktopTextExtraExtraSmall( style: STextStyles
.desktopTextExtraExtraSmall(
context) context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(context)
@ -185,13 +189,15 @@ class DesktopAboutView extends ConsumerWidget {
launchUrl( launchUrl(
Uri.parse( Uri.parse(
"https://stackwallet.com/terms-of-service.html"), "https://stackwallet.com/terms-of-service.html"),
mode: LaunchMode.externalApplication, mode:
LaunchMode.externalApplication,
); );
}, },
), ),
TextSpan( TextSpan(
text: " and ", text: " and ",
style: STextStyles.desktopTextExtraExtraSmall( style: STextStyles
.desktopTextExtraExtraSmall(
context) context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(context)
@ -207,7 +213,8 @@ class DesktopAboutView extends ConsumerWidget {
launchUrl( launchUrl(
Uri.parse( Uri.parse(
"https://stackwallet.com/privacy-policy.html"), "https://stackwallet.com/privacy-policy.html"),
mode: LaunchMode.externalApplication, mode:
LaunchMode.externalApplication,
); );
}, },
), ),
@ -218,13 +225,14 @@ class DesktopAboutView extends ConsumerWidget {
), ),
const SizedBox(height: 32), const SizedBox(height: 32),
Padding( Padding(
padding: const EdgeInsets.only(right: 10, bottom: 10), padding:
const EdgeInsets.only(right: 10, bottom: 10),
child: Column( child: Column(
children: [ children: [
FutureBuilder( FutureBuilder(
future: PackageInfo.fromPlatform(), future: PackageInfo.fromPlatform(),
builder: builder: (context,
(context, AsyncSnapshot<PackageInfo> snapshot) { AsyncSnapshot<PackageInfo> snapshot) {
String version = ""; String version = "";
String signature = ""; String signature = "";
String build = ""; String build = "";
@ -253,7 +261,8 @@ class DesktopAboutView extends ConsumerWidget {
.desktopTextExtraExtraSmall( .desktopTextExtraExtraSmall(
context) context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(
context)
.extension< .extension<
StackColors>()! StackColors>()!
.textDark), .textDark),
@ -263,7 +272,8 @@ class DesktopAboutView extends ConsumerWidget {
), ),
SelectableText( SelectableText(
version, version,
style: STextStyles.itemSubtitle( style:
STextStyles.itemSubtitle(
context), context),
), ),
], ],
@ -281,7 +291,8 @@ class DesktopAboutView extends ConsumerWidget {
.desktopTextExtraExtraSmall( .desktopTextExtraExtraSmall(
context) context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(
context)
.extension< .extension<
StackColors>()! StackColors>()!
.textDark), .textDark),
@ -291,7 +302,8 @@ class DesktopAboutView extends ConsumerWidget {
), ),
SelectableText( SelectableText(
build, build,
style: STextStyles.itemSubtitle( style:
STextStyles.itemSubtitle(
context), context),
), ),
], ],
@ -311,7 +323,8 @@ class DesktopAboutView extends ConsumerWidget {
.desktopTextExtraExtraSmall( .desktopTextExtraExtraSmall(
context) context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(
context)
.extension< .extension<
StackColors>()! StackColors>()!
.textDark), .textDark),
@ -321,7 +334,8 @@ class DesktopAboutView extends ConsumerWidget {
), ),
SelectableText( SelectableText(
signature, signature,
style: STextStyles.itemSubtitle( style:
STextStyles.itemSubtitle(
context), context),
), ),
], ],
@ -332,28 +346,33 @@ class DesktopAboutView extends ConsumerWidget {
FutureBuilder( FutureBuilder(
future: commitFiroFuture, future: commitFiroFuture,
builder: (context, builder: (context,
AsyncSnapshot<dynamic> snapshot) { AsyncSnapshot<dynamic>
snapshot) {
bool commitExists = false; bool commitExists = false;
bool isHead = false; bool isHead = false;
CommitStatus stateOfCommit = CommitStatus stateOfCommit =
CommitStatus.notLoaded; CommitStatus.notLoaded;
if (snapshot.connectionState == if (snapshot.connectionState ==
ConnectionState.done && ConnectionState
.done &&
snapshot.hasData) { snapshot.hasData) {
commitExists = commitExists = snapshot
snapshot.data![0] as bool; .data![0] as bool;
isHead = isHead = snapshot.data![1]
snapshot.data![1] as bool; as bool;
if (commitExists && isHead) { if (commitExists &&
isHead) {
stateOfCommit = stateOfCommit =
CommitStatus.isHead; CommitStatus.isHead;
} else if (commitExists) { } else if (commitExists) {
stateOfCommit = stateOfCommit =
CommitStatus.isOldCommit; CommitStatus
.isOldCommit;
} else { } else {
stateOfCommit = stateOfCommit =
CommitStatus.notACommit; CommitStatus
.notACommit;
} }
} }
TextStyle indicationStyle = TextStyle indicationStyle =
@ -362,27 +381,35 @@ class DesktopAboutView extends ConsumerWidget {
switch (stateOfCommit) { switch (stateOfCommit) {
case CommitStatus.isHead: case CommitStatus.isHead:
indicationStyle = STextStyles indicationStyle = STextStyles
.itemSubtitle(context) .itemSubtitle(
context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(
context)
.extension< .extension<
StackColors>()! StackColors>()!
.accentColorGreen); .accentColorGreen);
break; break;
case CommitStatus.isOldCommit: case CommitStatus
.isOldCommit:
indicationStyle = STextStyles indicationStyle = STextStyles
.itemSubtitle(context) .itemSubtitle(
context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(
context)
.extension< .extension<
StackColors>()! StackColors>()!
.accentColorYellow); .accentColorYellow);
break; break;
case CommitStatus.notACommit: case CommitStatus
.notACommit:
indicationStyle = STextStyles indicationStyle = STextStyles
.itemSubtitle(context) .itemSubtitle(
context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(
context)
.extension< .extension<
StackColors>()! StackColors>()!
.accentColorRed); .accentColorRed);
@ -392,7 +419,8 @@ class DesktopAboutView extends ConsumerWidget {
} }
return Column( return Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment
.start,
children: [ children: [
Text( Text(
"Firo Build Commit", "Firo Build Commit",
@ -424,28 +452,33 @@ class DesktopAboutView extends ConsumerWidget {
FutureBuilder( FutureBuilder(
future: commitEpicFuture, future: commitEpicFuture,
builder: (context, builder: (context,
AsyncSnapshot<dynamic> snapshot) { AsyncSnapshot<dynamic>
snapshot) {
bool commitExists = false; bool commitExists = false;
bool isHead = false; bool isHead = false;
CommitStatus stateOfCommit = CommitStatus stateOfCommit =
CommitStatus.notLoaded; CommitStatus.notLoaded;
if (snapshot.connectionState == if (snapshot.connectionState ==
ConnectionState.done && ConnectionState
.done &&
snapshot.hasData) { snapshot.hasData) {
commitExists = commitExists = snapshot
snapshot.data![0] as bool; .data![0] as bool;
isHead = isHead = snapshot.data![1]
snapshot.data![1] as bool; as bool;
if (commitExists && isHead) { if (commitExists &&
isHead) {
stateOfCommit = stateOfCommit =
CommitStatus.isHead; CommitStatus.isHead;
} else if (commitExists) { } else if (commitExists) {
stateOfCommit = stateOfCommit =
CommitStatus.isOldCommit; CommitStatus
.isOldCommit;
} else { } else {
stateOfCommit = stateOfCommit =
CommitStatus.notACommit; CommitStatus
.notACommit;
} }
} }
TextStyle indicationStyle = TextStyle indicationStyle =
@ -454,27 +487,35 @@ class DesktopAboutView extends ConsumerWidget {
switch (stateOfCommit) { switch (stateOfCommit) {
case CommitStatus.isHead: case CommitStatus.isHead:
indicationStyle = STextStyles indicationStyle = STextStyles
.itemSubtitle(context) .itemSubtitle(
context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(
context)
.extension< .extension<
StackColors>()! StackColors>()!
.accentColorGreen); .accentColorGreen);
break; break;
case CommitStatus.isOldCommit: case CommitStatus
.isOldCommit:
indicationStyle = STextStyles indicationStyle = STextStyles
.itemSubtitle(context) .itemSubtitle(
context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(
context)
.extension< .extension<
StackColors>()! StackColors>()!
.accentColorYellow); .accentColorYellow);
break; break;
case CommitStatus.notACommit: case CommitStatus
.notACommit:
indicationStyle = STextStyles indicationStyle = STextStyles
.itemSubtitle(context) .itemSubtitle(
context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(
context)
.extension< .extension<
StackColors>()! StackColors>()!
.accentColorRed); .accentColorRed);
@ -484,7 +525,8 @@ class DesktopAboutView extends ConsumerWidget {
} }
return Column( return Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment
.start,
children: [ children: [
Text( Text(
"Epic Cash Build Commit", "Epic Cash Build Commit",
@ -514,28 +556,33 @@ class DesktopAboutView extends ConsumerWidget {
FutureBuilder( FutureBuilder(
future: commitMoneroFuture, future: commitMoneroFuture,
builder: (context, builder: (context,
AsyncSnapshot<dynamic> snapshot) { AsyncSnapshot<dynamic>
snapshot) {
bool commitExists = false; bool commitExists = false;
bool isHead = false; bool isHead = false;
CommitStatus stateOfCommit = CommitStatus stateOfCommit =
CommitStatus.notLoaded; CommitStatus.notLoaded;
if (snapshot.connectionState == if (snapshot.connectionState ==
ConnectionState.done && ConnectionState
.done &&
snapshot.hasData) { snapshot.hasData) {
commitExists = commitExists = snapshot
snapshot.data![0] as bool; .data![0] as bool;
isHead = isHead = snapshot.data![1]
snapshot.data![1] as bool; as bool;
if (commitExists && isHead) { if (commitExists &&
isHead) {
stateOfCommit = stateOfCommit =
CommitStatus.isHead; CommitStatus.isHead;
} else if (commitExists) { } else if (commitExists) {
stateOfCommit = stateOfCommit =
CommitStatus.isOldCommit; CommitStatus
.isOldCommit;
} else { } else {
stateOfCommit = stateOfCommit =
CommitStatus.notACommit; CommitStatus
.notACommit;
} }
} }
TextStyle indicationStyle = TextStyle indicationStyle =
@ -544,27 +591,35 @@ class DesktopAboutView extends ConsumerWidget {
switch (stateOfCommit) { switch (stateOfCommit) {
case CommitStatus.isHead: case CommitStatus.isHead:
indicationStyle = STextStyles indicationStyle = STextStyles
.itemSubtitle(context) .itemSubtitle(
context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(
context)
.extension< .extension<
StackColors>()! StackColors>()!
.accentColorGreen); .accentColorGreen);
break; break;
case CommitStatus.isOldCommit: case CommitStatus
.isOldCommit:
indicationStyle = STextStyles indicationStyle = STextStyles
.itemSubtitle(context) .itemSubtitle(
context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(
context)
.extension< .extension<
StackColors>()! StackColors>()!
.accentColorYellow); .accentColorYellow);
break; break;
case CommitStatus.notACommit: case CommitStatus
.notACommit:
indicationStyle = STextStyles indicationStyle = STextStyles
.itemSubtitle(context) .itemSubtitle(
context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(
context)
.extension< .extension<
StackColors>()! StackColors>()!
.accentColorRed); .accentColorRed);
@ -574,7 +629,8 @@ class DesktopAboutView extends ConsumerWidget {
} }
return Column( return Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment
.start,
children: [ children: [
Text( Text(
"Monero Build Commit", "Monero Build Commit",
@ -613,7 +669,8 @@ class DesktopAboutView extends ConsumerWidget {
.desktopTextExtraExtraSmall( .desktopTextExtraExtraSmall(
context) context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(
context)
.extension< .extension<
StackColors>()! StackColors>()!
.textDark), .textDark),
@ -622,7 +679,8 @@ class DesktopAboutView extends ConsumerWidget {
height: 2, height: 2,
), ),
BlueTextButton( BlueTextButton(
text: "https://stackwallet.com", text:
"https://stackwallet.com",
onTap: () { onTap: () {
launchUrl( launchUrl(
Uri.parse( Uri.parse(
@ -650,6 +708,9 @@ class DesktopAboutView extends ConsumerWidget {
), ),
], ],
), ),
),
],
),
); );
} }
} }