Improve UI
This commit is contained in:
parent
00a27768e6
commit
30b5d1d91a
|
@ -83,15 +83,31 @@ class WalletOptions extends StatelessWidget with ChangeNotifier {
|
|||
body: Builder(
|
||||
builder: (ctx) => SafeArea(
|
||||
child: Column(children: <Widget>[
|
||||
SizedBox(height: 25),
|
||||
Row(children: <Widget>[
|
||||
Container(
|
||||
height: 15,
|
||||
color: Color(0xffFFD68E),
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Color(0xffFFD68E),
|
||||
Color(0xFFFFFCF7),
|
||||
],
|
||||
)),
|
||||
child: Row(children: <Widget>[
|
||||
SizedBox(width: 25),
|
||||
Image.asset(
|
||||
'assets/chopp-gecko2.png',
|
||||
),
|
||||
Column(children: <Widget>[
|
||||
Image.asset(
|
||||
'assets/walletOptions/camera.png',
|
||||
),
|
||||
SizedBox(height: 100)
|
||||
]),
|
||||
// SizedBox(width: 20),
|
||||
Column(children: <Widget>[
|
||||
Row(children: <Widget>[
|
||||
|
@ -118,25 +134,9 @@ class WalletOptions extends StatelessWidget with ChangeNotifier {
|
|||
fontWeight: FontWeight.w400)),
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
// Query(
|
||||
// options: QueryOptions(
|
||||
// document: gql(getBalance),
|
||||
// variables: <String, dynamic>{
|
||||
// 'pubkey': _walletOptions.pubkey.text,
|
||||
// },
|
||||
// ),
|
||||
// builder: (QueryResult result,
|
||||
// {fetchMore, refetch}) {
|
||||
// return Text(
|
||||
// '$result DU',
|
||||
// style: TextStyle(
|
||||
// fontSize: 20, color: Colors.black),
|
||||
// );
|
||||
// }),
|
||||
Query(
|
||||
options: QueryOptions(
|
||||
document: gql(
|
||||
getBalance), // this is the query string you just created
|
||||
document: gql(getBalance),
|
||||
variables: {
|
||||
'pubkey': _walletOptions.pubkey.text,
|
||||
},
|
||||
|
@ -156,7 +156,8 @@ class WalletOptions extends StatelessWidget with ChangeNotifier {
|
|||
if (result.data['balance'] == null) {
|
||||
wBalanceUD = '0.0';
|
||||
} else {
|
||||
int wBalanceG1 = result.data['balance']['amount'];
|
||||
int wBalanceG1 =
|
||||
result.data['balance']['amount'];
|
||||
int currentUD =
|
||||
result.data['currentUd']['amount'];
|
||||
double wBalanceUDBrut =
|
||||
|
@ -168,10 +169,12 @@ class WalletOptions extends StatelessWidget with ChangeNotifier {
|
|||
return Row(children: <Widget>[
|
||||
ImageFiltered(
|
||||
imageFilter: ImageFilter.blur(
|
||||
sigmaX:
|
||||
_walletOptions.isBalanceBlur ? 6 : 0,
|
||||
sigmaY:
|
||||
_walletOptions.isBalanceBlur ? 5 : 0),
|
||||
sigmaX: _walletOptions.isBalanceBlur
|
||||
? 6
|
||||
: 0,
|
||||
sigmaY: _walletOptions.isBalanceBlur
|
||||
? 5
|
||||
: 0),
|
||||
child: Text('$wBalanceUD',
|
||||
style: TextStyle(
|
||||
fontSize: 20, color: Colors.black)),
|
||||
|
@ -249,7 +252,7 @@ class WalletOptions extends StatelessWidget with ChangeNotifier {
|
|||
])
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
])),
|
||||
FutureBuilder(
|
||||
future: _walletOptions
|
||||
.generateQRcode(_walletOptions.pubkey.text),
|
||||
|
@ -285,22 +288,33 @@ class WalletOptions extends StatelessWidget with ChangeNotifier {
|
|||
fontWeight: FontWeight.w800,
|
||||
fontFamily: 'Monospace')),
|
||||
SizedBox(width: 15),
|
||||
ElevatedButton(
|
||||
SizedBox(
|
||||
height: 40,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: new BorderRadius.circular(8),
|
||||
borderRadius:
|
||||
new BorderRadius.circular(8),
|
||||
),
|
||||
elevation: 1,
|
||||
primary: Color(0xffD28928), // background
|
||||
onPrimary: Colors.black, // foreground
|
||||
),
|
||||
onPressed: () {
|
||||
ClipboardData(text: _walletOptions.pubkey.text);
|
||||
ClipboardData(
|
||||
text: _walletOptions.pubkey.text);
|
||||
_walletOptions.snackCopyKey(ctx);
|
||||
},
|
||||
child: Text('Copier',
|
||||
child: Row(children: <Widget>[
|
||||
Image.asset(
|
||||
'assets/walletOptions/copy-white.png',
|
||||
),
|
||||
SizedBox(width: 7),
|
||||
Text('Copier',
|
||||
style: TextStyle(
|
||||
fontSize: 15, color: Colors.grey[50]))),
|
||||
fontSize: 15,
|
||||
color: Colors.grey[50]))
|
||||
]))),
|
||||
]))),
|
||||
SizedBox(height: 10),
|
||||
InkWell(
|
||||
|
|
Loading…
Reference in New Issue