feat: information about contacts add/remove
This commit is contained in:
parent
6ec550e7ec
commit
9d63e6e522
|
@ -152,7 +152,7 @@
|
||||||
"canRenewCertInX": "You can renew\nthis certification\nin {}",
|
"canRenewCertInX": "You can renew\nthis certification\nin {}",
|
||||||
"executeATransfer": "Execute a transfer",
|
"executeATransfer": "Execute a transfer",
|
||||||
"executeTheTransfer": "Execute the transfer",
|
"executeTheTransfer": "Execute the transfer",
|
||||||
"doATransfer" : "Execute a\ntransfer",
|
"doATransfer": "Execute a\ntransfer",
|
||||||
"seconds": "{} seconds",
|
"seconds": "{} seconds",
|
||||||
"minutes": "{} minutes",
|
"minutes": "{} minutes",
|
||||||
"hours": "{} hours {}",
|
"hours": "{} hours {}",
|
||||||
|
@ -199,13 +199,13 @@
|
||||||
"ud": "{}UD",
|
"ud": "{}UD",
|
||||||
"chooseATargetWallet": "Choose a target wallet",
|
"chooseATargetWallet": "Choose a target wallet",
|
||||||
"thisMnemonicHasBeenCopiedToClipboard": "This mnemonic has been copied to clipboard",
|
"thisMnemonicHasBeenCopiedToClipboard": "This mnemonic has been copied to clipboard",
|
||||||
"smithCantMigrateIdentity":"You can't migrate this identity while you're member of smith web",
|
"smithCantMigrateIdentity": "You can't migrate this identity while you're member of smith web",
|
||||||
"received": "Received",
|
"received": "Received",
|
||||||
"sent": "Sent",
|
"sent": "Sent",
|
||||||
"createIdentity": "Create a new \nidentity",
|
"createIdentity": "Create a new \nidentity",
|
||||||
"memberAccountOf": "Account of {}",
|
"memberAccountOf": "Account of {}",
|
||||||
"pasteAddress": "Paste address from\nclipboard",
|
"pasteAddress": "Paste address from\nclipboard",
|
||||||
"historyStart" :"Beginning of history",
|
"historyStart": "Beginning of history",
|
||||||
"blockchainStart": "Beginning of the ĞDev",
|
"blockchainStart": "Beginning of the ĞDev",
|
||||||
"networkSettings": "Network Settings",
|
"networkSettings": "Network Settings",
|
||||||
"displaySettings": "Display Settings",
|
"displaySettings": "Display Settings",
|
||||||
|
@ -215,6 +215,7 @@
|
||||||
"blockN": "block N°{}",
|
"blockN": "block N°{}",
|
||||||
"thisIsNotAGoodCode": "This is not a good code",
|
"thisIsNotAGoodCode": "This is not a good code",
|
||||||
"youHaveToBeConnectedToValidateChest": "You have to be connected\nto validate your chest",
|
"youHaveToBeConnectedToValidateChest": "You have to be connected\nto validate your chest",
|
||||||
"thisIdentityAlreadyExist": "This identity already exists"
|
"thisIdentityAlreadyExist": "This identity already exists",
|
||||||
|
"removedFromcontacts": "Removed from contacts",
|
||||||
|
"addedToContacts": "Added to contacts"
|
||||||
}
|
}
|
|
@ -153,7 +153,7 @@
|
||||||
"canRenewCertInX": "Podrás renovar\nla certificación\nen {}",
|
"canRenewCertInX": "Podrás renovar\nla certificación\nen {}",
|
||||||
"executeATransfer": "Ejecutar una transacción",
|
"executeATransfer": "Ejecutar una transacción",
|
||||||
"executeTheTransfer": "Ejecutar la transacción",
|
"executeTheTransfer": "Ejecutar la transacción",
|
||||||
"doATransfer" : "Hacer una\ntransacción",
|
"doATransfer": "Hacer una\ntransacción",
|
||||||
"seconds": "{} segundos",
|
"seconds": "{} segundos",
|
||||||
"minutes": "{} minutos",
|
"minutes": "{} minutos",
|
||||||
"hours": "{} horas {}",
|
"hours": "{} horas {}",
|
||||||
|
@ -200,13 +200,13 @@
|
||||||
"ud": "{}DU",
|
"ud": "{}DU",
|
||||||
"chooseATargetWallet": "Elige un monedero de destino",
|
"chooseATargetWallet": "Elige un monedero de destino",
|
||||||
"thisMnemonicHasBeenCopiedToClipboard": "This mnemonic has been copied to clipboard",
|
"thisMnemonicHasBeenCopiedToClipboard": "This mnemonic has been copied to clipboard",
|
||||||
"smithCantMigrateIdentity":"You can't migrate this identity while you're member of smith web",
|
"smithCantMigrateIdentity": "You can't migrate this identity while you're member of smith web",
|
||||||
"received": "Received",
|
"received": "Received",
|
||||||
"sent": "Sent",
|
"sent": "Sent",
|
||||||
"createIdentity": "Create a new \nidentity",
|
"createIdentity": "Create a new \nidentity",
|
||||||
"memberAccountOf": "Account of {}",
|
"memberAccountOf": "Account of {}",
|
||||||
"pasteAddress": "Paste address from\nclipboard",
|
"pasteAddress": "Paste address from\nclipboard",
|
||||||
"historyStart" :"Beginning of history",
|
"historyStart": "Beginning of history",
|
||||||
"blockchainStart": "Comienzo de la ĞDev",
|
"blockchainStart": "Comienzo de la ĞDev",
|
||||||
"networkSettings": "Parametros de red",
|
"networkSettings": "Parametros de red",
|
||||||
"displaySettings": "Parametros interficie",
|
"displaySettings": "Parametros interficie",
|
||||||
|
@ -216,5 +216,7 @@
|
||||||
"blockN": "bloque N°{}",
|
"blockN": "bloque N°{}",
|
||||||
"thisIsNotAGoodCode": "Este codígo no es valido",
|
"thisIsNotAGoodCode": "Este codígo no es valido",
|
||||||
"youHaveToBeConnectedToValidateChest": "Tienes que tener conneción\npara validar tu cofre",
|
"youHaveToBeConnectedToValidateChest": "Tienes que tener conneción\npara validar tu cofre",
|
||||||
"thisIdentityAlreadyExist": "Esta identidad ya existe"
|
"thisIdentityAlreadyExist": "Esta identidad ya existe",
|
||||||
}
|
"removedFromcontacts": "Removed from contacts",
|
||||||
|
"addedToContacts": "Added to contacts"
|
||||||
|
}
|
|
@ -199,13 +199,13 @@
|
||||||
"ud": "{}DU",
|
"ud": "{}DU",
|
||||||
"chooseATargetWallet": "Choisissez un portefeuille cible",
|
"chooseATargetWallet": "Choisissez un portefeuille cible",
|
||||||
"thisMnemonicHasBeenCopiedToClipboard": "Cette phrase secrète viens d'être copié dans votre presse-papier.",
|
"thisMnemonicHasBeenCopiedToClipboard": "Cette phrase secrète viens d'être copié dans votre presse-papier.",
|
||||||
"smithCantMigrateIdentity":"Vous ne pouvez pas migrer cette identité\ntant que vous êtes dans la toile forgerons",
|
"smithCantMigrateIdentity": "Vous ne pouvez pas migrer cette identité\ntant que vous êtes dans la toile forgerons",
|
||||||
"received": "Reçus",
|
"received": "Reçus",
|
||||||
"sent": "Envoyés",
|
"sent": "Envoyés",
|
||||||
"createIdentity": "Créer sa nouvelle\nidentité",
|
"createIdentity": "Créer sa nouvelle\nidentité",
|
||||||
"memberAccountOf": "Compte de {}",
|
"memberAccountOf": "Compte de {}",
|
||||||
"pasteAddress": "Coller l'adresse depuis\nle presse-papier",
|
"pasteAddress": "Coller l'adresse depuis\nle presse-papier",
|
||||||
"historyStart" :"Début de l'historique",
|
"historyStart": "Début de l'historique",
|
||||||
"blockchainStart": "Début de la ĞDev",
|
"blockchainStart": "Début de la ĞDev",
|
||||||
"networkSettings": "Connectivité réseau",
|
"networkSettings": "Connectivité réseau",
|
||||||
"displaySettings": "Affichage",
|
"displaySettings": "Affichage",
|
||||||
|
@ -215,5 +215,7 @@
|
||||||
"blockN": "bloc N°{}",
|
"blockN": "bloc N°{}",
|
||||||
"thisIsNotAGoodCode": "Ce n'est pas le bon code",
|
"thisIsNotAGoodCode": "Ce n'est pas le bon code",
|
||||||
"youHaveToBeConnectedToValidateChest": "Vous devez vous connecter à internet\npour valider votre coffre",
|
"youHaveToBeConnectedToValidateChest": "Vous devez vous connecter à internet\npour valider votre coffre",
|
||||||
"thisIdentityAlreadyExist": "Cette identité existe déjà"
|
"thisIdentityAlreadyExist": "Cette identité existe déjà",
|
||||||
}
|
"removedFromcontacts": "Retiré des contact",
|
||||||
|
"addedToContacts": "Ajouté au contacts"
|
||||||
|
}
|
|
@ -1,3 +1,5 @@
|
||||||
|
// ignore_for_file: use_build_context_synchronously
|
||||||
|
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
@ -8,6 +10,7 @@ import 'package:jdenticon_dart/jdenticon_dart.dart';
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
// import 'package:qrscan/qrscan.dart' as scanner;
|
// import 'package:qrscan/qrscan.dart' as scanner;
|
||||||
import 'package:barcode_scan2/barcode_scan2.dart';
|
import 'package:barcode_scan2/barcode_scan2.dart';
|
||||||
|
import 'package:confetti/confetti.dart';
|
||||||
|
|
||||||
class WalletsProfilesProvider with ChangeNotifier {
|
class WalletsProfilesProvider with ChangeNotifier {
|
||||||
WalletsProfilesProvider(this.address);
|
WalletsProfilesProvider(this.address);
|
||||||
|
@ -21,6 +24,8 @@ class WalletsProfilesProvider with ChangeNotifier {
|
||||||
TextEditingController payAmount = TextEditingController();
|
TextEditingController payAmount = TextEditingController();
|
||||||
TextEditingController payComment = TextEditingController();
|
TextEditingController payComment = TextEditingController();
|
||||||
num? _balance;
|
num? _balance;
|
||||||
|
final centerController =
|
||||||
|
ConfettiController(duration: const Duration(milliseconds: 300));
|
||||||
|
|
||||||
Future<String> scan(context) async {
|
Future<String> scan(context) async {
|
||||||
if (Platform.isAndroid || Platform.isIOS) {
|
if (Platform.isAndroid || Platform.isIOS) {
|
||||||
|
@ -137,8 +142,12 @@ class WalletsProfilesProvider with ChangeNotifier {
|
||||||
// log.d(profile.username);
|
// log.d(profile.username);
|
||||||
if (isContact(profile.address)) {
|
if (isContact(profile.address)) {
|
||||||
await contactsBox.delete(profile.address);
|
await contactsBox.delete(profile.address);
|
||||||
|
snackMessage(homeContext, message: 'removedFromcontacts'.tr());
|
||||||
} else {
|
} else {
|
||||||
|
centerController.play();
|
||||||
await contactsBox.put(profile.address, profile);
|
await contactsBox.put(profile.address, profile);
|
||||||
|
// drawStar(Size(50, 50));
|
||||||
|
snackMessage(homeContext, message: 'addedToContacts'.tr());
|
||||||
}
|
}
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
// ignore_for_file: use_build_context_synchronously
|
// ignore_for_file: use_build_context_synchronously
|
||||||
|
|
||||||
|
import 'dart:math';
|
||||||
|
|
||||||
|
import 'package:confetti/confetti.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
|
@ -61,6 +64,16 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
actions: [
|
actions: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
|
ConfettiWidget(
|
||||||
|
confettiController: walletProfile.centerController,
|
||||||
|
blastDirection: pi / 2,
|
||||||
|
maxBlastForce: 7,
|
||||||
|
minBlastForce: 3,
|
||||||
|
emissionFrequency: 0,
|
||||||
|
numberOfParticles: 7,
|
||||||
|
shouldLoop: false,
|
||||||
|
gravity: 0.001,
|
||||||
|
),
|
||||||
Consumer<WalletsProfilesProvider>(
|
Consumer<WalletsProfilesProvider>(
|
||||||
builder: (context, walletProfile, _) {
|
builder: (context, walletProfile, _) {
|
||||||
return IconButton(
|
return IconButton(
|
||||||
|
|
|
@ -265,6 +265,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.17.0"
|
version: "1.17.0"
|
||||||
|
confetti:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: confetti
|
||||||
|
sha256: "979aafde2428c53947892c95eb244466c109c129b7eee9011f0a66caaca52267"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.7.0"
|
||||||
connectivity_plus:
|
connectivity_plus:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -65,6 +65,7 @@ dependencies:
|
||||||
hive_generator: ^2.0.0
|
hive_generator: ^2.0.0
|
||||||
riverpod: ^2.1.1
|
riverpod: ^2.1.1
|
||||||
tutorial_coach_mark: ^1.2.4
|
tutorial_coach_mark: ^1.2.4
|
||||||
|
confetti: ^0.7.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
# flutter_launcher_icons: ^0.9.2
|
# flutter_launcher_icons: ^0.9.2
|
||||||
|
|
Loading…
Reference in New Issue