feat: information about contacts add/remove

This commit is contained in:
poka 2023-03-15 19:18:29 +01:00
parent 6ec550e7ec
commit 9d63e6e522
7 changed files with 50 additions and 14 deletions

View File

@ -152,7 +152,7 @@
"canRenewCertInX": "You can renew\nthis certification\nin {}",
"executeATransfer": "Execute a transfer",
"executeTheTransfer": "Execute the transfer",
"doATransfer" : "Execute a\ntransfer",
"doATransfer": "Execute a\ntransfer",
"seconds": "{} seconds",
"minutes": "{} minutes",
"hours": "{} hours {}",
@ -199,13 +199,13 @@
"ud": "{}UD",
"chooseATargetWallet": "Choose a target wallet",
"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",
"sent": "Sent",
"createIdentity": "Create a new \nidentity",
"memberAccountOf": "Account of {}",
"pasteAddress": "Paste address from\nclipboard",
"historyStart" :"Beginning of history",
"historyStart": "Beginning of history",
"blockchainStart": "Beginning of the ĞDev",
"networkSettings": "Network Settings",
"displaySettings": "Display Settings",
@ -215,6 +215,7 @@
"blockN": "block N°{}",
"thisIsNotAGoodCode": "This is not a good code",
"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"
}

View File

@ -153,7 +153,7 @@
"canRenewCertInX": "Podrás renovar\nla certificación\nen {}",
"executeATransfer": "Ejecutar una transacción",
"executeTheTransfer": "Ejecutar la transacción",
"doATransfer" : "Hacer una\ntransacción",
"doATransfer": "Hacer una\ntransacción",
"seconds": "{} segundos",
"minutes": "{} minutos",
"hours": "{} horas {}",
@ -200,13 +200,13 @@
"ud": "{}DU",
"chooseATargetWallet": "Elige un monedero de destino",
"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",
"sent": "Sent",
"createIdentity": "Create a new \nidentity",
"memberAccountOf": "Account of {}",
"pasteAddress": "Paste address from\nclipboard",
"historyStart" :"Beginning of history",
"historyStart": "Beginning of history",
"blockchainStart": "Comienzo de la ĞDev",
"networkSettings": "Parametros de red",
"displaySettings": "Parametros interficie",
@ -216,5 +216,7 @@
"blockN": "bloque N°{}",
"thisIsNotAGoodCode": "Este codígo no es valido",
"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"
}

View File

@ -199,13 +199,13 @@
"ud": "{}DU",
"chooseATargetWallet": "Choisissez un portefeuille cible",
"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",
"sent": "Envoyés",
"createIdentity": "Créer sa nouvelle\nidentité",
"memberAccountOf": "Compte de {}",
"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",
"networkSettings": "Connectivité réseau",
"displaySettings": "Affichage",
@ -215,5 +215,7 @@
"blockN": "bloc N°{}",
"thisIsNotAGoodCode": "Ce n'est pas le bon code",
"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"
}

View File

@ -1,3 +1,5 @@
// ignore_for_file: use_build_context_synchronously
import 'dart:io';
import 'package:easy_localization/easy_localization.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:qrscan/qrscan.dart' as scanner;
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:confetti/confetti.dart';
class WalletsProfilesProvider with ChangeNotifier {
WalletsProfilesProvider(this.address);
@ -21,6 +24,8 @@ class WalletsProfilesProvider with ChangeNotifier {
TextEditingController payAmount = TextEditingController();
TextEditingController payComment = TextEditingController();
num? _balance;
final centerController =
ConfettiController(duration: const Duration(milliseconds: 300));
Future<String> scan(context) async {
if (Platform.isAndroid || Platform.isIOS) {
@ -137,8 +142,12 @@ class WalletsProfilesProvider with ChangeNotifier {
// log.d(profile.username);
if (isContact(profile.address)) {
await contactsBox.delete(profile.address);
snackMessage(homeContext, message: 'removedFromcontacts'.tr());
} else {
centerController.play();
await contactsBox.put(profile.address, profile);
// drawStar(Size(50, 50));
snackMessage(homeContext, message: 'addedToContacts'.tr());
}
notifyListeners();
}

View File

@ -1,5 +1,8 @@
// ignore_for_file: use_build_context_synchronously
import 'dart:math';
import 'package:confetti/confetti.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/services.dart';
@ -61,6 +64,16 @@ class WalletViewScreen extends StatelessWidget {
actions: [
Row(
children: [
ConfettiWidget(
confettiController: walletProfile.centerController,
blastDirection: pi / 2,
maxBlastForce: 7,
minBlastForce: 3,
emissionFrequency: 0,
numberOfParticles: 7,
shouldLoop: false,
gravity: 0.001,
),
Consumer<WalletsProfilesProvider>(
builder: (context, walletProfile, _) {
return IconButton(

View File

@ -265,6 +265,14 @@ packages:
url: "https://pub.dev"
source: hosted
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:
dependency: "direct main"
description:

View File

@ -65,6 +65,7 @@ dependencies:
hive_generator: ^2.0.0
riverpod: ^2.1.1
tutorial_coach_mark: ^1.2.4
confetti: ^0.7.0
dev_dependencies:
# flutter_launcher_icons: ^0.9.2