mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
desktop about ui fix
This commit is contained in:
parent
e41f8088b0
commit
43deb9f81f
1 changed files with 497 additions and 436 deletions
|
@ -140,262 +140,123 @@ class DesktopAboutView extends ConsumerWidget {
|
|||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(24, 10, 24, 35),
|
||||
child: RoundedWhiteContainer(
|
||||
width: 929,
|
||||
height: 411,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 10, top: 10),
|
||||
child: Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Stack Wallet",
|
||||
style: STextStyles.desktopH3(context),
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Row(
|
||||
children: [
|
||||
RichText(
|
||||
textAlign: TextAlign.start,
|
||||
text: TextSpan(
|
||||
style: STextStyles.label(context),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: RoundedWhiteContainer(
|
||||
width: 929,
|
||||
height: 411,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 10, top: 10),
|
||||
child: Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
"By using Stack Wallet, you agree to the ",
|
||||
style: STextStyles.desktopTextExtraExtraSmall(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textDark3),
|
||||
),
|
||||
TextSpan(
|
||||
text: "Terms of service",
|
||||
style: STextStyles.richLink(context)
|
||||
.copyWith(fontSize: 14),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
launchUrl(
|
||||
Uri.parse(
|
||||
"https://stackwallet.com/terms-of-service.html"),
|
||||
mode: LaunchMode.externalApplication,
|
||||
);
|
||||
},
|
||||
),
|
||||
TextSpan(
|
||||
text: " and ",
|
||||
style: STextStyles.desktopTextExtraExtraSmall(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textDark3),
|
||||
),
|
||||
TextSpan(
|
||||
text: "Privacy policy",
|
||||
style: STextStyles.richLink(context)
|
||||
.copyWith(fontSize: 14),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
launchUrl(
|
||||
Uri.parse(
|
||||
"https://stackwallet.com/privacy-policy.html"),
|
||||
mode: LaunchMode.externalApplication,
|
||||
);
|
||||
},
|
||||
Text(
|
||||
"Stack Wallet",
|
||||
style: STextStyles.desktopH3(context),
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 10, bottom: 10),
|
||||
child: Column(
|
||||
children: [
|
||||
FutureBuilder(
|
||||
future: PackageInfo.fromPlatform(),
|
||||
builder:
|
||||
(context, AsyncSnapshot<PackageInfo> snapshot) {
|
||||
String version = "";
|
||||
String signature = "";
|
||||
String build = "";
|
||||
const SizedBox(height: 16),
|
||||
Row(
|
||||
children: [
|
||||
RichText(
|
||||
textAlign: TextAlign.start,
|
||||
text: TextSpan(
|
||||
style: STextStyles.label(context),
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
"By using Stack Wallet, you agree to the ",
|
||||
style: STextStyles
|
||||
.desktopTextExtraExtraSmall(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textDark3),
|
||||
),
|
||||
TextSpan(
|
||||
text: "Terms of service",
|
||||
style: STextStyles.richLink(context)
|
||||
.copyWith(fontSize: 14),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
launchUrl(
|
||||
Uri.parse(
|
||||
"https://stackwallet.com/terms-of-service.html"),
|
||||
mode:
|
||||
LaunchMode.externalApplication,
|
||||
);
|
||||
},
|
||||
),
|
||||
TextSpan(
|
||||
text: " and ",
|
||||
style: STextStyles
|
||||
.desktopTextExtraExtraSmall(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textDark3),
|
||||
),
|
||||
TextSpan(
|
||||
text: "Privacy policy",
|
||||
style: STextStyles.richLink(context)
|
||||
.copyWith(fontSize: 14),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
launchUrl(
|
||||
Uri.parse(
|
||||
"https://stackwallet.com/privacy-policy.html"),
|
||||
mode:
|
||||
LaunchMode.externalApplication,
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(right: 10, bottom: 10),
|
||||
child: Column(
|
||||
children: [
|
||||
FutureBuilder(
|
||||
future: PackageInfo.fromPlatform(),
|
||||
builder: (context,
|
||||
AsyncSnapshot<PackageInfo> snapshot) {
|
||||
String version = "";
|
||||
String signature = "";
|
||||
String build = "";
|
||||
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState.done &&
|
||||
snapshot.hasData) {
|
||||
version = snapshot.data!.version;
|
||||
build = snapshot.data!.buildNumber;
|
||||
signature = snapshot.data!.buildSignature;
|
||||
}
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState.done &&
|
||||
snapshot.hasData) {
|
||||
version = snapshot.data!.version;
|
||||
build = snapshot.data!.buildNumber;
|
||||
signature = snapshot.data!.buildSignature;
|
||||
}
|
||||
|
||||
return Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Version",
|
||||
style: STextStyles
|
||||
.desktopTextExtraExtraSmall(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.textDark),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SelectableText(
|
||||
version,
|
||||
style: STextStyles.itemSubtitle(
|
||||
context),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
width: 400,
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Build number",
|
||||
style: STextStyles
|
||||
.desktopTextExtraExtraSmall(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.textDark),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SelectableText(
|
||||
build,
|
||||
style: STextStyles.itemSubtitle(
|
||||
context),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
Row(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Build signature",
|
||||
style: STextStyles
|
||||
.desktopTextExtraExtraSmall(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.textDark),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SelectableText(
|
||||
signature,
|
||||
style: STextStyles.itemSubtitle(
|
||||
context),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
width: 350,
|
||||
),
|
||||
FutureBuilder(
|
||||
future: commitFiroFuture,
|
||||
builder: (context,
|
||||
AsyncSnapshot<dynamic> snapshot) {
|
||||
bool commitExists = false;
|
||||
bool isHead = false;
|
||||
CommitStatus stateOfCommit =
|
||||
CommitStatus.notLoaded;
|
||||
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState.done &&
|
||||
snapshot.hasData) {
|
||||
commitExists =
|
||||
snapshot.data![0] as bool;
|
||||
isHead =
|
||||
snapshot.data![1] as bool;
|
||||
if (commitExists && isHead) {
|
||||
stateOfCommit =
|
||||
CommitStatus.isHead;
|
||||
} else if (commitExists) {
|
||||
stateOfCommit =
|
||||
CommitStatus.isOldCommit;
|
||||
} else {
|
||||
stateOfCommit =
|
||||
CommitStatus.notACommit;
|
||||
}
|
||||
}
|
||||
TextStyle indicationStyle =
|
||||
STextStyles.itemSubtitle(
|
||||
context);
|
||||
switch (stateOfCommit) {
|
||||
case CommitStatus.isHead:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorGreen);
|
||||
break;
|
||||
case CommitStatus.isOldCommit:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorYellow);
|
||||
break;
|
||||
case CommitStatus.notACommit:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorRed);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return Column(
|
||||
return Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Firo Build Commit",
|
||||
"Version",
|
||||
style: STextStyles
|
||||
.desktopTextExtraExtraSmall(
|
||||
context)
|
||||
|
@ -410,84 +271,22 @@ class DesktopAboutView extends ConsumerWidget {
|
|||
height: 2,
|
||||
),
|
||||
SelectableText(
|
||||
firoCommit,
|
||||
style: indicationStyle,
|
||||
version,
|
||||
style:
|
||||
STextStyles.itemSubtitle(
|
||||
context),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 35),
|
||||
Row(
|
||||
children: [
|
||||
FutureBuilder(
|
||||
future: commitEpicFuture,
|
||||
builder: (context,
|
||||
AsyncSnapshot<dynamic> snapshot) {
|
||||
bool commitExists = false;
|
||||
bool isHead = false;
|
||||
CommitStatus stateOfCommit =
|
||||
CommitStatus.notLoaded;
|
||||
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState.done &&
|
||||
snapshot.hasData) {
|
||||
commitExists =
|
||||
snapshot.data![0] as bool;
|
||||
isHead =
|
||||
snapshot.data![1] as bool;
|
||||
if (commitExists && isHead) {
|
||||
stateOfCommit =
|
||||
CommitStatus.isHead;
|
||||
} else if (commitExists) {
|
||||
stateOfCommit =
|
||||
CommitStatus.isOldCommit;
|
||||
} else {
|
||||
stateOfCommit =
|
||||
CommitStatus.notACommit;
|
||||
}
|
||||
}
|
||||
TextStyle indicationStyle =
|
||||
STextStyles.itemSubtitle(
|
||||
context);
|
||||
switch (stateOfCommit) {
|
||||
case CommitStatus.isHead:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorGreen);
|
||||
break;
|
||||
case CommitStatus.isOldCommit:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorYellow);
|
||||
break;
|
||||
case CommitStatus.notACommit:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorRed);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return Column(
|
||||
),
|
||||
const SizedBox(
|
||||
width: 400,
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Epic Cash Build Commit",
|
||||
"Build number",
|
||||
style: STextStyles
|
||||
.desktopTextExtraExtraSmall(
|
||||
context)
|
||||
|
@ -502,82 +301,24 @@ class DesktopAboutView extends ConsumerWidget {
|
|||
height: 2,
|
||||
),
|
||||
SelectableText(
|
||||
epicCashCommit,
|
||||
style: indicationStyle,
|
||||
build,
|
||||
style:
|
||||
STextStyles.itemSubtitle(
|
||||
context),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
const SizedBox(
|
||||
width: 105,
|
||||
),
|
||||
FutureBuilder(
|
||||
future: commitMoneroFuture,
|
||||
builder: (context,
|
||||
AsyncSnapshot<dynamic> snapshot) {
|
||||
bool commitExists = false;
|
||||
bool isHead = false;
|
||||
CommitStatus stateOfCommit =
|
||||
CommitStatus.notLoaded;
|
||||
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState.done &&
|
||||
snapshot.hasData) {
|
||||
commitExists =
|
||||
snapshot.data![0] as bool;
|
||||
isHead =
|
||||
snapshot.data![1] as bool;
|
||||
if (commitExists && isHead) {
|
||||
stateOfCommit =
|
||||
CommitStatus.isHead;
|
||||
} else if (commitExists) {
|
||||
stateOfCommit =
|
||||
CommitStatus.isOldCommit;
|
||||
} else {
|
||||
stateOfCommit =
|
||||
CommitStatus.notACommit;
|
||||
}
|
||||
}
|
||||
TextStyle indicationStyle =
|
||||
STextStyles.itemSubtitle(
|
||||
context);
|
||||
switch (stateOfCommit) {
|
||||
case CommitStatus.isHead:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorGreen);
|
||||
break;
|
||||
case CommitStatus.isOldCommit:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorYellow);
|
||||
break;
|
||||
case CommitStatus.notACommit:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorRed);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return Column(
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
Row(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Monero Build Commit",
|
||||
"Build signature",
|
||||
style: STextStyles
|
||||
.desktopTextExtraExtraSmall(
|
||||
context)
|
||||
|
@ -592,60 +333,380 @@ class DesktopAboutView extends ConsumerWidget {
|
|||
height: 2,
|
||||
),
|
||||
SelectableText(
|
||||
moneroCommit,
|
||||
style: indicationStyle,
|
||||
signature,
|
||||
style:
|
||||
STextStyles.itemSubtitle(
|
||||
context),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 35),
|
||||
Row(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Website",
|
||||
style: STextStyles
|
||||
.desktopTextExtraExtraSmall(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.textDark),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
BlueTextButton(
|
||||
text: "https://stackwallet.com",
|
||||
onTap: () {
|
||||
launchUrl(
|
||||
Uri.parse(
|
||||
"https://stackwallet.com"),
|
||||
mode: LaunchMode
|
||||
.externalApplication,
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(
|
||||
width: 350,
|
||||
),
|
||||
FutureBuilder(
|
||||
future: commitFiroFuture,
|
||||
builder: (context,
|
||||
AsyncSnapshot<dynamic>
|
||||
snapshot) {
|
||||
bool commitExists = false;
|
||||
bool isHead = false;
|
||||
CommitStatus stateOfCommit =
|
||||
CommitStatus.notLoaded;
|
||||
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState
|
||||
.done &&
|
||||
snapshot.hasData) {
|
||||
commitExists = snapshot
|
||||
.data![0] as bool;
|
||||
isHead = snapshot.data![1]
|
||||
as bool;
|
||||
if (commitExists &&
|
||||
isHead) {
|
||||
stateOfCommit =
|
||||
CommitStatus.isHead;
|
||||
} else if (commitExists) {
|
||||
stateOfCommit =
|
||||
CommitStatus
|
||||
.isOldCommit;
|
||||
} else {
|
||||
stateOfCommit =
|
||||
CommitStatus
|
||||
.notACommit;
|
||||
}
|
||||
}
|
||||
TextStyle indicationStyle =
|
||||
STextStyles.itemSubtitle(
|
||||
context);
|
||||
switch (stateOfCommit) {
|
||||
case CommitStatus.isHead:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(
|
||||
context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorGreen);
|
||||
break;
|
||||
case CommitStatus
|
||||
.isOldCommit:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(
|
||||
context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorYellow);
|
||||
break;
|
||||
case CommitStatus
|
||||
.notACommit:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(
|
||||
context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorRed);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Text(
|
||||
"Firo Build Commit",
|
||||
style: STextStyles
|
||||
.desktopTextExtraExtraSmall(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(
|
||||
context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.textDark),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SelectableText(
|
||||
firoCommit,
|
||||
style: indicationStyle,
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 35),
|
||||
Row(
|
||||
children: [
|
||||
FutureBuilder(
|
||||
future: commitEpicFuture,
|
||||
builder: (context,
|
||||
AsyncSnapshot<dynamic>
|
||||
snapshot) {
|
||||
bool commitExists = false;
|
||||
bool isHead = false;
|
||||
CommitStatus stateOfCommit =
|
||||
CommitStatus.notLoaded;
|
||||
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState
|
||||
.done &&
|
||||
snapshot.hasData) {
|
||||
commitExists = snapshot
|
||||
.data![0] as bool;
|
||||
isHead = snapshot.data![1]
|
||||
as bool;
|
||||
if (commitExists &&
|
||||
isHead) {
|
||||
stateOfCommit =
|
||||
CommitStatus.isHead;
|
||||
} else if (commitExists) {
|
||||
stateOfCommit =
|
||||
CommitStatus
|
||||
.isOldCommit;
|
||||
} else {
|
||||
stateOfCommit =
|
||||
CommitStatus
|
||||
.notACommit;
|
||||
}
|
||||
}
|
||||
TextStyle indicationStyle =
|
||||
STextStyles.itemSubtitle(
|
||||
context);
|
||||
switch (stateOfCommit) {
|
||||
case CommitStatus.isHead:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(
|
||||
context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorGreen);
|
||||
break;
|
||||
case CommitStatus
|
||||
.isOldCommit:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(
|
||||
context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorYellow);
|
||||
break;
|
||||
case CommitStatus
|
||||
.notACommit:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(
|
||||
context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorRed);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Text(
|
||||
"Epic Cash Build Commit",
|
||||
style: STextStyles
|
||||
.desktopTextExtraExtraSmall(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(
|
||||
context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.textDark),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SelectableText(
|
||||
epicCashCommit,
|
||||
style: indicationStyle,
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
const SizedBox(
|
||||
width: 105,
|
||||
),
|
||||
FutureBuilder(
|
||||
future: commitMoneroFuture,
|
||||
builder: (context,
|
||||
AsyncSnapshot<dynamic>
|
||||
snapshot) {
|
||||
bool commitExists = false;
|
||||
bool isHead = false;
|
||||
CommitStatus stateOfCommit =
|
||||
CommitStatus.notLoaded;
|
||||
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState
|
||||
.done &&
|
||||
snapshot.hasData) {
|
||||
commitExists = snapshot
|
||||
.data![0] as bool;
|
||||
isHead = snapshot.data![1]
|
||||
as bool;
|
||||
if (commitExists &&
|
||||
isHead) {
|
||||
stateOfCommit =
|
||||
CommitStatus.isHead;
|
||||
} else if (commitExists) {
|
||||
stateOfCommit =
|
||||
CommitStatus
|
||||
.isOldCommit;
|
||||
} else {
|
||||
stateOfCommit =
|
||||
CommitStatus
|
||||
.notACommit;
|
||||
}
|
||||
}
|
||||
TextStyle indicationStyle =
|
||||
STextStyles.itemSubtitle(
|
||||
context);
|
||||
switch (stateOfCommit) {
|
||||
case CommitStatus.isHead:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(
|
||||
context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorGreen);
|
||||
break;
|
||||
case CommitStatus
|
||||
.isOldCommit:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(
|
||||
context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorYellow);
|
||||
break;
|
||||
case CommitStatus
|
||||
.notACommit:
|
||||
indicationStyle = STextStyles
|
||||
.itemSubtitle(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(
|
||||
context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.accentColorRed);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Text(
|
||||
"Monero Build Commit",
|
||||
style: STextStyles
|
||||
.desktopTextExtraExtraSmall(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(
|
||||
context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.textDark),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SelectableText(
|
||||
moneroCommit,
|
||||
style: indicationStyle,
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 35),
|
||||
Row(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Website",
|
||||
style: STextStyles
|
||||
.desktopTextExtraExtraSmall(
|
||||
context)
|
||||
.copyWith(
|
||||
color: Theme.of(
|
||||
context)
|
||||
.extension<
|
||||
StackColors>()!
|
||||
.textDark),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
BlueTextButton(
|
||||
text:
|
||||
"https://stackwallet.com",
|
||||
onTap: () {
|
||||
launchUrl(
|
||||
Uri.parse(
|
||||
"https://stackwallet.com"),
|
||||
mode: LaunchMode
|
||||
.externalApplication,
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue