Before Width: | Height: | Size: 956 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 665 B After Width: | Height: | Size: 638 B |
@ -0,0 +1,100 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:cake_wallet/src/widgets/base_alert_dialog.dart';
|
||||||
|
|
||||||
|
class ConfirmSendingAlert extends BaseAlertDialog {
|
||||||
|
ConfirmSendingAlert({
|
||||||
|
@required this.alertTitle,
|
||||||
|
@required this.amount,
|
||||||
|
@required this.amountValue,
|
||||||
|
@required this.fee,
|
||||||
|
@required this.feeValue,
|
||||||
|
@required this.leftButtonText,
|
||||||
|
@required this.rightButtonText,
|
||||||
|
@required this.actionLeftButton,
|
||||||
|
@required this.actionRightButton,
|
||||||
|
this.alertBarrierDismissible = true
|
||||||
|
});
|
||||||
|
|
||||||
|
final String alertTitle;
|
||||||
|
final String amount;
|
||||||
|
final String amountValue;
|
||||||
|
final String fee;
|
||||||
|
final String feeValue;
|
||||||
|
final String leftButtonText;
|
||||||
|
final String rightButtonText;
|
||||||
|
final VoidCallback actionLeftButton;
|
||||||
|
final VoidCallback actionRightButton;
|
||||||
|
final bool alertBarrierDismissible;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get titleText => alertTitle;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get leftActionButtonText => leftButtonText;
|
||||||
|
@override
|
||||||
|
String get rightActionButtonText => rightButtonText;
|
||||||
|
@override
|
||||||
|
VoidCallback get actionLeft => actionLeftButton;
|
||||||
|
@override
|
||||||
|
VoidCallback get actionRight => actionRightButton;
|
||||||
|
@override
|
||||||
|
bool get barrierDismissible => alertBarrierDismissible;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget content(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: <Widget>[
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
amount,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Colors.white,
|
||||||
|
decoration: TextDecoration.none,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
amountValue,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Colors.white,
|
||||||
|
decoration: TextDecoration.none,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
fee,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Colors.white,
|
||||||
|
decoration: TextDecoration.none,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
feeValue,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: Colors.white,
|
||||||
|
decoration: TextDecoration.none,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,105 @@
|
|||||||
|
import 'dart:ui';
|
||||||
|
import 'package:cake_wallet/palette.dart';
|
||||||
|
import 'package:cake_wallet/src/stores/send/sending_state.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:cake_wallet/src/widgets/primary_button.dart';
|
||||||
|
import 'package:cake_wallet/src/stores/send/send_store.dart';
|
||||||
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
|
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||||
|
|
||||||
|
class SendingAlert extends StatefulWidget {
|
||||||
|
SendingAlert({@required this.sendStore});
|
||||||
|
|
||||||
|
final SendStore sendStore;
|
||||||
|
|
||||||
|
@override
|
||||||
|
SendingAlertState createState() => SendingAlertState(sendStore);
|
||||||
|
}
|
||||||
|
|
||||||
|
class SendingAlertState extends State<SendingAlert> {
|
||||||
|
SendingAlertState(this.sendStore);
|
||||||
|
|
||||||
|
final SendStore sendStore;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Observer(
|
||||||
|
builder: (_) {
|
||||||
|
final state = sendStore.state;
|
||||||
|
|
||||||
|
if (state is TransactionCommitted) {
|
||||||
|
return Stack(
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
color: PaletteDark.historyPanel,
|
||||||
|
child: Center(
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/images/birthday_cake.png'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(top: 220, left: 24, right: 24),
|
||||||
|
child: Text(
|
||||||
|
'Your Monero was successfully sent',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 22,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Colors.white,
|
||||||
|
decoration: TextDecoration.none,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
left: 24,
|
||||||
|
right: 24,
|
||||||
|
bottom: 24,
|
||||||
|
child: PrimaryButton(
|
||||||
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
|
text: 'Got it',
|
||||||
|
color: Colors.blue,
|
||||||
|
textColor: Colors.white
|
||||||
|
)
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Stack(
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
color: PaletteDark.historyPanel,
|
||||||
|
child: Center(
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/images/birthday_cake.png'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
BackdropFilter(
|
||||||
|
filter: ImageFilter.blur(sigmaX: 3.0, sigmaY: 3.0),
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(color: PaletteDark.historyPanel.withOpacity(0.25)),
|
||||||
|
child: Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(top: 220),
|
||||||
|
child: Text(
|
||||||
|
'Sending...',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 22,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Colors.white,
|
||||||
|
decoration: TextDecoration.none,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|