Multi pay graphic
This commit is contained in:
parent
647eae0ed8
commit
beb082cc17
|
@ -0,0 +1,93 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 496 496" style="enable-background:new 0 0 496 496;" xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<path d="M376,288V184c0-13.232-10.768-24-24-24h-40v-8c0-13.232-10.768-24-24-24c-3.16,0-6.16,0.648-8.928,1.76
|
||||
C276.304,119.56,267.064,112,256,112c-11.064,0-20.312,7.56-23.072,17.76C230.16,128.648,227.16,128,224,128
|
||||
c-6.168,0-11.744,2.408-16,6.24c-4.256-3.84-9.832-6.24-16-6.24c-13.232,0-24,10.768-24,24v8h-24c-13.232,0-24,10.768-24,24v104
|
||||
c0,13.232,10.768,24,24,24h16v13.072c0,8.384,1.976,16.776,5.728,24.28L184,385.888V496h16V382.112L180.04,342.2
|
||||
c-2.64-5.296-4.04-11.216-4.04-17.128V312h118.776l6.104-36.584C301.976,268.8,307.64,264,314.344,264
|
||||
c7.528,0,13.656,6.128,13.656,13.656v50.112c0,8.656-2.976,17.152-8.392,23.912L296,381.192V496h16V386.808l20.112-25.136
|
||||
C339.776,352.08,344,340.04,344,327.768V312h8C365.232,312,376,301.232,376,288z M280,152c0-4.416,3.584-8,8-8
|
||||
c4.416,0,8,3.584,8,8v8h-16V152z M248,152v-16c0-4.416,3.584-8,8-8c4.416,0,8,3.584,8,8v16v8h-16V152z M216,152
|
||||
c0-4.416,3.584-8,8-8s8,3.584,8,8v8h-16V152z M184,152c0-4.416,3.584-8,8-8s8,3.584,8,8v8h-16V152z M360,288c0,4.416-3.584,8-8,8
|
||||
h-8v-18.344C344,261.304,330.696,248,314.344,248c-14.552,0-26.856,10.424-29.248,24.784L281.224,296H144c-4.416,0-8-3.584-8-8
|
||||
v-80h224V288z M360,192H136v-8c0-4.416,3.584-8,8-8h208c4.416,0,8,3.584,8,8V192z"/>
|
||||
<path d="M176,288c4.072,0,8.152-0.832,12-2.424c3.848,1.592,7.928,2.424,12,2.424c17.648,0,32-14.352,32-32s-14.352-32-32-32
|
||||
c-4.072,0-8.152,0.832-12,2.424c-3.848-1.592-7.928-2.424-12-2.424c-17.648,0-32,14.352-32,32S158.352,288,176,288z M176,240
|
||||
c2.744,0,5.424,0.752,7.968,2.24l4.032,2.344l4.032-2.344c2.544-1.488,5.224-2.24,7.968-2.24c8.816,0,16,7.176,16,16
|
||||
c0,8.824-7.184,16-16,16c-2.744,0-5.424-0.752-7.968-2.24L188,267.416l-4.032,2.344c-2.544,1.488-5.224,2.24-7.968,2.24
|
||||
c-8.824,0-16-7.176-16-16C160,247.176,167.176,240,176,240z"/>
|
||||
<path d="M248,80c22.056,0,40-17.944,40-40c0-22.056-17.944-40-40-40c-22.056,0-40,17.944-40,40C208,62.056,225.944,80,248,80z
|
||||
M248,16c13.232,0,24,10.768,24,24s-10.768,24-24,24s-24-10.768-24-24S234.768,16,248,16z"/>
|
||||
<path d="M100.92,140.92c10.688,0,20.736-4.168,28.28-11.72c7.552-7.544,11.72-17.592,11.72-28.28s-4.16-20.728-11.72-28.28
|
||||
c-7.552-7.552-17.592-11.72-28.28-11.72c-10.688,0-20.736,4.168-28.28,11.72c-7.552,7.544-11.72,17.592-11.72,28.28
|
||||
s4.168,20.736,11.72,28.28C80.184,136.76,90.232,140.92,100.92,140.92z M83.952,83.952c4.528-4.528,10.552-7.032,16.968-7.032
|
||||
c6.416,0,12.44,2.504,16.968,7.032c4.528,4.528,7.032,10.552,7.032,16.968c0,6.416-2.504,12.44-7.032,16.968
|
||||
c-9.064,9.064-24.872,9.064-33.936,0c-4.528-4.528-7.032-10.552-7.032-16.968C76.92,94.512,79.424,88.488,83.952,83.952z"/>
|
||||
<path d="M80,248c0-22.056-17.944-40-40-40c-22.056,0-40,17.944-40,40c0,22.056,17.944,40,40,40C62.056,288,80,270.056,80,248z
|
||||
M40,272c-13.232,0-24-10.768-24-24s10.768-24,24-24s24,10.768,24,24S53.232,272,40,272z"/>
|
||||
<path d="M100.92,355.08c-10.688,0-20.728,4.168-28.28,11.72s-11.72,17.592-11.72,28.28s4.168,20.736,11.72,28.28
|
||||
c7.544,7.552,17.592,11.72,28.28,11.72c10.688,0,20.736-4.168,28.28-11.72c7.552-7.544,11.72-17.592,11.72-28.28
|
||||
s-4.16-20.736-11.72-28.28C121.656,359.24,111.608,355.08,100.92,355.08z M117.888,412.048c-9.064,9.064-24.872,9.064-33.936,0
|
||||
c-4.528-4.528-7.032-10.552-7.032-16.968c0-6.416,2.504-12.44,7.032-16.968c4.528-4.528,10.552-7.032,16.968-7.032
|
||||
c6.416,0,12.44,2.504,16.968,7.032s7.032,10.552,7.032,16.968C124.92,401.496,122.424,407.512,117.888,412.048z"/>
|
||||
<path d="M395.08,355.08c-10.688,0-20.736,4.168-28.28,11.72c-7.552,7.544-11.72,17.592-11.72,28.28s4.168,20.728,11.72,28.28
|
||||
s17.592,11.72,28.28,11.72s20.736-4.168,28.28-11.72c7.552-7.544,11.72-17.592,11.72-28.28s-4.168-20.736-11.72-28.28
|
||||
C415.816,359.24,405.768,355.08,395.08,355.08z M412.048,412.048c-9.064,9.064-24.872,9.064-33.936,0
|
||||
c-4.528-4.528-7.032-10.552-7.032-16.968c0-6.416,2.504-12.44,7.032-16.968c4.528-4.528,10.552-7.032,16.968-7.032
|
||||
c6.416,0,12.44,2.504,16.968,7.032c4.528,4.528,7.032,10.552,7.032,16.968C419.08,401.496,416.576,407.512,412.048,412.048z"/>
|
||||
<path d="M456,208c-22.056,0-40,17.944-40,40c0,22.056,17.944,40,40,40c22.056,0,40-17.944,40-40C496,225.944,478.056,208,456,208
|
||||
z M456,272c-13.232,0-24-10.768-24-24s10.768-24,24-24s24,10.768,24,24S469.232,272,456,272z"/>
|
||||
<path d="M395.08,140.92c10.688,0,20.728-4.168,28.28-11.72s11.72-17.592,11.72-28.28s-4.168-20.736-11.72-28.28
|
||||
c-7.544-7.552-17.592-11.72-28.28-11.72s-20.736,4.168-28.28,11.72c-7.552,7.544-11.72,17.592-11.72,28.28
|
||||
s4.168,20.736,11.72,28.28C374.344,136.76,384.392,140.92,395.08,140.92z M378.112,83.952c4.528-4.528,10.552-7.032,16.968-7.032
|
||||
c6.416,0,12.44,2.504,16.968,7.032c4.528,4.528,7.032,10.552,7.032,16.968c0,6.416-2.504,12.44-7.032,16.968
|
||||
c-9.064,9.064-24.872,9.064-33.936,0c-4.528-4.528-7.032-10.552-7.032-16.968C371.08,94.512,373.576,88.488,378.112,83.952z"/>
|
||||
<rect x="168.004" y="59.047" transform="matrix(0.4473 0.8944 -0.8944 0.4473 158.0894 -119.8369)" width="16" height="17.888"/>
|
||||
|
||||
<rect x="61.819" y="162.686" transform="matrix(0.9486 0.3166 -0.3166 0.9486 57.9274 -13.2747)" width="15.993" height="17.889"/>
|
||||
<rect x="59.048" y="311.992" transform="matrix(0.4472 0.8944 -0.8944 0.4472 323.7949 116.0737)" width="17.888" height="16"/>
|
||||
|
||||
<rect x="418.224" y="315.385" transform="matrix(-0.9486 -0.3166 0.3166 -0.9486 727.8361 766.9136)" width="15.993" height="17.889"/>
|
||||
|
||||
<rect x="419.043" y="167.999" transform="matrix(-0.4472 -0.8944 0.8944 -0.4472 461.9725 637.5105)" width="17.887" height="15.999"/>
|
||||
|
||||
<rect x="315.413" y="61.776" transform="matrix(0.9487 0.3162 -0.3162 0.9487 38.7034 -98.9815)" width="17.888" height="15.992"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.1 KiB |
|
@ -57,6 +57,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
MessageLookupByLibrary.simpleMessage("Account name is required"),
|
||||
"accounts": MessageLookupByLibrary.simpleMessage("Accounts"),
|
||||
"add": MessageLookupByLibrary.simpleMessage("ADD"),
|
||||
"addARecipientAndItWillShowHere": MessageLookupByLibrary.simpleMessage(
|
||||
"Add a recipient and it will show here"),
|
||||
"addContact": MessageLookupByLibrary.simpleMessage("Add Contact"),
|
||||
"address": MessageLookupByLibrary.simpleMessage("Address"),
|
||||
"addressCopiedToClipboard":
|
||||
|
@ -149,6 +151,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"noAuthenticationMethod":
|
||||
MessageLookupByLibrary.simpleMessage("No Authentication Method"),
|
||||
"noContacts": MessageLookupByLibrary.simpleMessage("No Contacts"),
|
||||
"noRecipient": MessageLookupByLibrary.simpleMessage("No Recipient"),
|
||||
"noSpendingInTheLast30Days": MessageLookupByLibrary.simpleMessage(
|
||||
"No Spending in the Last 30 Days"),
|
||||
"notEnoughBalance":
|
||||
|
|
|
@ -57,6 +57,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"Se requiere el nombre de cuenta"),
|
||||
"accounts": MessageLookupByLibrary.simpleMessage("Cuentas"),
|
||||
"add": MessageLookupByLibrary.simpleMessage("AGREGAR"),
|
||||
"addARecipientAndItWillShowHere": MessageLookupByLibrary.simpleMessage(
|
||||
"Add a recipient and it will show here"),
|
||||
"addContact": MessageLookupByLibrary.simpleMessage("Add Contact"),
|
||||
"address": MessageLookupByLibrary.simpleMessage("Dirección"),
|
||||
"addressCopiedToClipboard": MessageLookupByLibrary.simpleMessage(
|
||||
|
@ -146,6 +148,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"noAuthenticationMethod":
|
||||
MessageLookupByLibrary.simpleMessage("Sin método de autenticación"),
|
||||
"noContacts": MessageLookupByLibrary.simpleMessage("No Contacts"),
|
||||
"noRecipient": MessageLookupByLibrary.simpleMessage("No Recipient"),
|
||||
"noSpendingInTheLast30Days":
|
||||
MessageLookupByLibrary.simpleMessage("Sin Pagos En 30 Días"),
|
||||
"notEnoughBalance":
|
||||
|
|
|
@ -57,6 +57,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
MessageLookupByLibrary.simpleMessage("Le nom du compte est requis"),
|
||||
"accounts": MessageLookupByLibrary.simpleMessage("Comptes"),
|
||||
"add": MessageLookupByLibrary.simpleMessage("AJOUTER"),
|
||||
"addARecipientAndItWillShowHere": MessageLookupByLibrary.simpleMessage(
|
||||
"Add a recipient and it will show here"),
|
||||
"addContact":
|
||||
MessageLookupByLibrary.simpleMessage("Ajouter un contact"),
|
||||
"address": MessageLookupByLibrary.simpleMessage("adresse"),
|
||||
|
@ -148,6 +150,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"noAuthenticationMethod": MessageLookupByLibrary.simpleMessage(
|
||||
"Pas de méthode d\'authentification"),
|
||||
"noContacts": MessageLookupByLibrary.simpleMessage("Pas de Contacts"),
|
||||
"noRecipient": MessageLookupByLibrary.simpleMessage("No Recipient"),
|
||||
"noSpendingInTheLast30Days": MessageLookupByLibrary.simpleMessage(
|
||||
"Aucune dépense au cours des 30 derniers jours"),
|
||||
"notEnoughBalance":
|
||||
|
|
|
@ -51,6 +51,8 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
MessageLookupByLibrary.simpleMessage("請輸入帳戶名稱"),
|
||||
"accounts": MessageLookupByLibrary.simpleMessage("帳戶"),
|
||||
"add": MessageLookupByLibrary.simpleMessage("增加"),
|
||||
"addARecipientAndItWillShowHere": MessageLookupByLibrary.simpleMessage(
|
||||
"Add a recipient and it will show here"),
|
||||
"addContact": MessageLookupByLibrary.simpleMessage("Add Contact"),
|
||||
"address": MessageLookupByLibrary.simpleMessage("地址"),
|
||||
"addressCopiedToClipboard":
|
||||
|
@ -131,6 +133,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
|||
"noAccount": MessageLookupByLibrary.simpleMessage("沒有帳戶"),
|
||||
"noAuthenticationMethod": MessageLookupByLibrary.simpleMessage("不用驗證"),
|
||||
"noContacts": MessageLookupByLibrary.simpleMessage("No Contacts"),
|
||||
"noRecipient": MessageLookupByLibrary.simpleMessage("No Recipient"),
|
||||
"noSpendingInTheLast30Days":
|
||||
MessageLookupByLibrary.simpleMessage("過去三十天內沒有任何開支"),
|
||||
"notEnoughBalance": MessageLookupByLibrary.simpleMessage("帳戶結餘不足"),
|
||||
|
|
|
@ -1411,6 +1411,26 @@ class S {
|
|||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `No Recipient`
|
||||
String get noRecipient {
|
||||
return Intl.message(
|
||||
'No Recipient',
|
||||
name: 'noRecipient',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Add a recipient and it will show here`
|
||||
String get addARecipientAndItWillShowHere {
|
||||
return Intl.message(
|
||||
'Add a recipient and it will show here',
|
||||
name: 'addARecipientAndItWillShowHere',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class AppLocalizationDelegate extends LocalizationsDelegate<S> {
|
||||
|
|
|
@ -134,5 +134,7 @@
|
|||
"accountHasSomeBalanceAreYouSureYouWantTo": "Account has some BALANCE. Are you sure you want to delete it?",
|
||||
"deleteAccount": "Delete Account",
|
||||
"gold": "Gold",
|
||||
"purple": "Purple"
|
||||
"purple": "Purple",
|
||||
"noRecipient": "No Recipient",
|
||||
"addARecipientAndItWillShowHere": "Add a recipient and it will show here"
|
||||
}
|
||||
|
|
|
@ -134,5 +134,7 @@
|
|||
"accountHasSomeBalanceAreYouSureYouWantTo": "Account has some BALANCE. Are you sure you want to delete it?",
|
||||
"deleteAccount": "Delete Account",
|
||||
"gold": "Gold",
|
||||
"purple": "Purple"
|
||||
"purple": "Purple",
|
||||
"noRecipient": "No Recipient",
|
||||
"addARecipientAndItWillShowHere": "Add a recipient and it will show here"
|
||||
}
|
||||
|
|
|
@ -134,5 +134,7 @@
|
|||
"accountHasSomeBalanceAreYouSureYouWantTo": "Account has some BALANCE. Are you sure you want to delete it?",
|
||||
"deleteAccount": "Delete Account",
|
||||
"gold": "Gold",
|
||||
"purple": "Purple"
|
||||
"purple": "Purple",
|
||||
"noRecipient": "No Recipient",
|
||||
"addARecipientAndItWillShowHere": "Add a recipient and it will show here"
|
||||
}
|
||||
|
|
|
@ -130,5 +130,7 @@
|
|||
"accountHasSomeBalanceAreYouSureYouWantTo": "Account has some BALANCE. Are you sure you want to delete it?",
|
||||
"deleteAccount": "Delete Account",
|
||||
"gold": "Gold",
|
||||
"purple": "Purple"
|
||||
"purple": "Purple",
|
||||
"noRecipient": "No Recipient",
|
||||
"addARecipientAndItWillShowHere": "Add a recipient and it will show here"
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:decimal/decimal.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_barcode_scanner/flutter_barcode_scanner.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:flutter_typeahead/flutter_typeahead.dart';
|
||||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||
import 'package:warp/store.dart';
|
||||
|
@ -23,6 +24,7 @@ class MultiPayState extends State<MultiPayPage> {
|
|||
return Scaffold(
|
||||
appBar: AppBar(title: Text(S.of(context).multiPay)),
|
||||
body: Observer(builder: (context) {
|
||||
if (multipayData.recipients.isEmpty) return NoRecipient();
|
||||
final rows = multipayData.recipients.asMap().entries.map((e) {
|
||||
final index = e.key;
|
||||
final recipient = e.value;
|
||||
|
@ -206,3 +208,21 @@ class PayRecipientState extends State<PayRecipient> {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class NoRecipient extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final Widget contact = SvgPicture.asset('assets/multipay.svg',
|
||||
color: Theme.of(context).primaryColor, semanticsLabel: 'Contacts');
|
||||
|
||||
return Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
SizedBox(child: contact, height: 150, width: 150),
|
||||
Padding(padding: EdgeInsets.symmetric(vertical: 16)),
|
||||
Text(S.of(context).noRecipient, style: Theme.of(context).textTheme.headline5),
|
||||
Padding(padding: EdgeInsets.symmetric(vertical: 8)),
|
||||
Text(S.of(context).addARecipientAndItWillShowHere,
|
||||
style: Theme.of(context).textTheme.bodyText1),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ class SendState extends State<SendPage> {
|
|||
controller: _fiatAmountController,
|
||||
keyboardType: TextInputType.number,
|
||||
inputFormatters: [makeInputFormatter(_mZEC)],
|
||||
validator: (v) => _checkAmount(v, allowZero: true),
|
||||
validator: (v) => _checkAmount(v, isFiat: true),
|
||||
onTap: () => setState(() { _inputInZEC = false; }),
|
||||
onChanged: (_) {
|
||||
_updateAmount();
|
||||
|
@ -207,13 +207,12 @@ class SendState extends State<SendPage> {
|
|||
return null;
|
||||
}
|
||||
|
||||
String? _checkAmount(String? vs, { bool allowZero: false }) {
|
||||
String? _checkAmount(String? vs, { bool isFiat: false }) {
|
||||
if (vs == null) return S.of(context).amountMustBeANumber;
|
||||
final v = parseNumber(vs);
|
||||
if (v == null) return S.of(context).amountMustBeANumber;
|
||||
if (v < 0.0) return S.of(context).amountMustBePositive;
|
||||
if (v == 0.0 && !allowZero) return S.of(context).amountMustBePositive;
|
||||
if (amountInZAT(Decimal.parse(v.toString())) > _balance)
|
||||
if (!isFiat && v == 0.0) return S.of(context).amountMustBePositive;
|
||||
if (!isFiat && amountInZAT(Decimal.parse(v.toString())) > _balance)
|
||||
return S.of(context).notEnoughBalance;
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
version: 1.0.9+141
|
||||
version: 1.0.9+142
|
||||
|
||||
environment:
|
||||
sdk: ">=2.12.0 <3.0.0"
|
||||
|
@ -79,7 +79,7 @@ dev_dependencies:
|
|||
flutter_native_splash: ^1.2.3
|
||||
|
||||
flutter_app_name:
|
||||
name: "ZWalletTest"
|
||||
name: ""
|
||||
|
||||
flutter_icons:
|
||||
android: true
|
||||
|
@ -109,6 +109,7 @@ flutter:
|
|||
- assets/about.md
|
||||
- assets/wallet.svg
|
||||
- assets/contacts.svg
|
||||
- assets/multipay.svg
|
||||
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/assets-and-images/#resolution-aware.
|
||||
|
|
|
@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
version: 1.0.9+141
|
||||
version: 1.0.9+142
|
||||
|
||||
environment:
|
||||
sdk: ">=2.12.0 <3.0.0"
|
||||
|
@ -109,6 +109,7 @@ flutter:
|
|||
- assets/about.md
|
||||
- assets/wallet.svg
|
||||
- assets/contacts.svg
|
||||
- assets/multipay.svg
|
||||
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/assets-and-images/#resolution-aware.
|
||||
|
|
Loading…
Reference in New Issue