can't pay if offline

This commit is contained in:
poka 2022-06-12 19:56:43 +02:00
parent 1a49035cbf
commit 9ec7a6594d
1 changed files with 43 additions and 32 deletions

View File

@ -360,40 +360,51 @@ class WalletViewScreen extends StatelessWidget {
// }, // },
// ), // ),
const Spacer(), const Spacer(),
Container( Consumer<SubstrateSdk>(builder: (context, _sub, _) {
height: buttonSize, return Opacity(
decoration: BoxDecoration( opacity: _sub.nodeConnected ? 1 : 0.5,
color: const Color(0xff7c94b6), child: Container(
borderRadius: const BorderRadius.all(Radius.circular(100)), height: buttonSize,
border: Border.all( decoration: BoxDecoration(
color: const Color(0xFF6c4204), color: const Color(0xff7c94b6),
width: 4, borderRadius: const BorderRadius.all(Radius.circular(100)),
border: Border.all(
color: const Color(0xFF6c4204),
width: 4,
),
),
child: ClipOval(
child: Material(
color: orangeC, // button color
child: InkWell(
key: const Key('pay'),
splashColor: yellowC, // inkwell color
child: const Padding(
padding: EdgeInsets.all(14),
child: Image(
image: AssetImage('assets/vector_white.png'),
)),
onTap: _sub.nodeConnected
? () {
paymentPopup(context, _walletViewProvider);
}
: null),
),
),
), ),
), );
child: ClipOval( }),
child: Material(
color: orangeC, // button color
child: InkWell(
key: const Key('pay'),
splashColor: yellowC, // inkwell color
child: const Padding(
padding: EdgeInsets.all(14),
child: Image(
image: AssetImage('assets/vector_white.png'),
)),
onTap: () {
paymentPopup(context, _walletViewProvider);
}),
),
),
),
const SizedBox(height: 9), const SizedBox(height: 9),
Text( Consumer<SubstrateSdk>(builder: (context, _sub, _) {
"Faire un\nvirement", return Text(
textAlign: TextAlign.center, "Faire un\nvirement",
style: TextStyle( textAlign: TextAlign.center,
fontSize: buttonFontSize, fontWeight: FontWeight.w500), style: TextStyle(
), color: _sub.nodeConnected ? Colors.black : Colors.grey[500],
fontSize: buttonFontSize,
fontWeight: FontWeight.w500),
);
}),
SizedBox(height: isTall ? 50 : 20) SizedBox(height: isTall ? 50 : 20)
]), ]),
)); ));