remove unused commented code

This commit is contained in:
poka 2022-09-12 08:28:19 +02:00
parent ad0019522f
commit a432db334d
2 changed files with 9 additions and 59 deletions

View File

@ -42,7 +42,6 @@ class WalletsHome extends StatelessWidget {
return WillPopScope(
onWillPop: () {
// myWalletProvider.pinCode = myWalletProvider.mnemonic = '';
Navigator.popUntil(
context,
ModalRoute.withName('/'),
@ -57,7 +56,6 @@ class WalletsHome extends StatelessWidget {
leading: IconButton(
icon: const Icon(Icons.arrow_back, color: Colors.black),
onPressed: () {
// myWalletProvider.pinCode = myWalletProvider.mnemonic = '';
Navigator.popUntil(
context,
ModalRoute.withName('/'),
@ -223,7 +221,6 @@ class WalletsHome extends StatelessWidget {
} else if (screenWidth >= 650) {
nTule = 3;
}
// final dragAnchorStrategy = pointerDragAnchorStrategy;
return CustomScrollView(slivers: <Widget>[
const SliverToBoxAdapter(child: SizedBox(height: 20)),
@ -271,10 +268,8 @@ class WalletsHome extends StatelessWidget {
sub.reload();
paymentPopup(context, repository.address!);
},
// onMove: ((details) => log.d('oooookkkkkkkk')),
onMove: (details) {
if (repository.address! != myWalletProvider.lastFlyBy) {
log.d('oooookkkkkkkk: ${repository.address!}');
myWalletProvider.lastFlyBy = repository.address!;
myWalletProvider.reload();
}
@ -370,16 +365,7 @@ class WalletsHome extends StatelessWidget {
? addNewDerivation(context)
: const Text('');
}),
// SizedBox(height: 1),
// Padding(
// padding: EdgeInsets.symmetric(horizontal: 35),
// child: Text(
// 'Ajouter un portefeuille',
// textAlign: TextAlign.center,
// style: TextStyle(fontSize: 18),
// ))
]),
// SliverToBoxAdapter(child: Spacer()),
SliverToBoxAdapter(child: chestOptions(context, myWalletProvider)),
]);
}
@ -413,14 +399,9 @@ class WalletsHome extends StatelessWidget {
return ListTile(
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(bottom: Radius.circular(12))),
// contentPadding: const EdgeInsets.only(left: 7.0),
tileColor: repository.address == defaultWallet.address
? orangeC
: const Color(0xffFFD58D),
// leading: Text('IMAGE'),
// subtitle: Text(_repository.split(':')[3],
// style: TextStyle(fontSize: 12.0, fontFamily: 'Monospace')),
title: Center(
child: Padding(
padding: const EdgeInsets.only(left: 5, right: 5, bottom: 35, top: 5),
@ -435,13 +416,7 @@ class WalletsHome extends StatelessWidget {
: Colors.black),
),
),
// dense: true,
onTap: () {
// _walletOptions.readLocalWallet(
// context,
// _repository,
// _myWalletProvider.pinCode,
// pinLength);
walletOptions.getAddress(currentChestNumber, repository.derivation!);
Navigator.push(
context,
@ -517,12 +492,6 @@ class WalletsHome extends StatelessWidget {
}
}
// extension Range on num {
// bool isBetween(num from, num to) {
// return from < this && this < to;
// }
// }
class CustomClipperOval extends CustomClipper<Rect> {
@override
Rect getClip(Size size) {

View File

@ -49,9 +49,6 @@ class WalletViewScreen extends StatelessWidget {
sub.setCurrentWallet(defaultWallet);
// sub.spawnBlock();
// sub.spawnBlock(0, 25);
return Scaffold(
backgroundColor: backgroundColor,
resizeToAvoidBottomInset: true,
@ -118,7 +115,7 @@ class WalletViewScreen extends StatelessWidget {
height: buttonSize,
child: ClipOval(
child: Material(
color: yellowC, //const Color(0xffFFD58D), // button color
color: yellowC,
child: InkWell(
key: keyViewActivity,
splashColor: orangeC, // inkwell color
@ -129,7 +126,6 @@ class WalletViewScreen extends StatelessWidget {
'assets/walletOptions/clock.png'),
height: 90)),
onTap: () {
// _historyProvider.nPage = 1;
Navigator.push(
context,
MaterialPageRoute(builder: (context) {
@ -154,8 +150,7 @@ class WalletViewScreen extends StatelessWidget {
Consumer<SubstrateSdk>(builder: (context, sub, _) {
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
return FutureBuilder(
future: sub.certState(defaultWallet.address!,
address!), // .canCertify(_defaultWallet.address!, pubkey!),
future: sub.certState(defaultWallet.address!, address!),
builder: (context, AsyncSnapshot<Map<String, int>> snapshot) {
if (snapshot.data == null) return const SizedBox();
String duration = '';
@ -207,11 +202,10 @@ class WalletViewScreen extends StatelessWidget {
height: buttonSize,
child: ClipOval(
child: Material(
color:
const Color(0xffFFD58D), // button color
color: const Color(0xffFFD58D),
child: InkWell(
key: keyCertify,
splashColor: orangeC, // inkwell color
splashColor: orangeC,
child: const Padding(
padding: EdgeInsets.only(bottom: 0),
child: Image(
@ -293,10 +287,10 @@ class WalletViewScreen extends StatelessWidget {
height: buttonSize,
child: ClipOval(
child: Material(
color: const Color(0xffFFD58D), // button color
color: const Color(0xffFFD58D),
child: InkWell(
key: keyCopyAddress,
splashColor: orangeC, // inkwell color
splashColor: orangeC,
child: const Padding(
padding: EdgeInsets.all(20),
child: Image(
@ -334,7 +328,7 @@ class WalletViewScreen extends StatelessWidget {
),
child: ClipOval(
child: Material(
color: orangeC, // button color
color: orangeC,
child: InkWell(
key: keyPay,
splashColor: yellowC,
@ -342,7 +336,7 @@ class WalletViewScreen extends StatelessWidget {
? () {
paymentPopup(context, address!);
}
: null, // inkwell color
: null,
child: const Padding(
padding: EdgeInsets.all(14),
child: Image(
@ -400,8 +394,6 @@ class WalletViewScreen extends StatelessWidget {
}
void paymentPopup(BuildContext context, String toAddress) {
// WalletsProfilesProvider _walletViewProvider =
// Provider.of<WalletsProfilesProvider>(context, listen: false);
final walletViewProvider =
Provider.of<WalletsProfilesProvider>(context, listen: false);
@ -585,7 +577,6 @@ void paymentPopup(BuildContext context, String toAddress) {
color: Colors.grey[600]),
),
const SizedBox(width: 10),
// const Spacer(flex: 1),
Column(
children: [
const SizedBox(height: 2),
@ -598,7 +589,6 @@ void paymentPopup(BuildContext context, String toAddress) {
fontWeight: FontWeight.w600,
),
),
// const Spacer(flex: 2),
],
),
],
@ -622,17 +612,13 @@ void paymentPopup(BuildContext context, String toAddress) {
maxLines: 1,
textAlign: TextAlign.center,
keyboardType: TextInputType.number,
onChanged: (_) => setState(() {
// _walletViewProvider.reload();
}),
onChanged: (_) => setState(() {}),
inputFormatters: <TextInputFormatter>[
// FilteringTextInputFormatter.digitsOnly,
FilteringTextInputFormatter.deny(',',
replacementString: '.'),
FilteringTextInputFormatter.allow(
RegExp(r'(^\d+\.?\d{0,2})')),
],
// onChanged: (v) => _searchProvider.reload(),
decoration: InputDecoration(
hintText: '0.00',
suffix: Text(isUdUnit
@ -640,10 +626,6 @@ void paymentPopup(BuildContext context, String toAddress) {
: currencyName), // udUnitDisplay(40),
filled: true,
fillColor: Colors.transparent,
// border: OutlineInputBorder(
// borderSide:
// BorderSide(color: Colors.grey[500], width: 2),
// borderRadius: BorderRadius.circular(8)),
focusedBorder: OutlineInputBorder(
borderSide:
BorderSide(color: Colors.grey[500]!, width: 2),
@ -657,7 +639,6 @@ void paymentPopup(BuildContext context, String toAddress) {
fontWeight: FontWeight.w600,
),
),
// const SizedBox(height: 40),
const Spacer(),
SizedBox(
width: double.infinity,