forked from axiom-team/gecko
remove unused commented code
This commit is contained in:
parent
ad0019522f
commit
a432db334d
|
@ -42,7 +42,6 @@ class WalletsHome extends StatelessWidget {
|
||||||
|
|
||||||
return WillPopScope(
|
return WillPopScope(
|
||||||
onWillPop: () {
|
onWillPop: () {
|
||||||
// myWalletProvider.pinCode = myWalletProvider.mnemonic = '';
|
|
||||||
Navigator.popUntil(
|
Navigator.popUntil(
|
||||||
context,
|
context,
|
||||||
ModalRoute.withName('/'),
|
ModalRoute.withName('/'),
|
||||||
|
@ -57,7 +56,6 @@ class WalletsHome extends StatelessWidget {
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: const Icon(Icons.arrow_back, color: Colors.black),
|
icon: const Icon(Icons.arrow_back, color: Colors.black),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// myWalletProvider.pinCode = myWalletProvider.mnemonic = '';
|
|
||||||
Navigator.popUntil(
|
Navigator.popUntil(
|
||||||
context,
|
context,
|
||||||
ModalRoute.withName('/'),
|
ModalRoute.withName('/'),
|
||||||
|
@ -223,7 +221,6 @@ class WalletsHome extends StatelessWidget {
|
||||||
} else if (screenWidth >= 650) {
|
} else if (screenWidth >= 650) {
|
||||||
nTule = 3;
|
nTule = 3;
|
||||||
}
|
}
|
||||||
// final dragAnchorStrategy = pointerDragAnchorStrategy;
|
|
||||||
|
|
||||||
return CustomScrollView(slivers: <Widget>[
|
return CustomScrollView(slivers: <Widget>[
|
||||||
const SliverToBoxAdapter(child: SizedBox(height: 20)),
|
const SliverToBoxAdapter(child: SizedBox(height: 20)),
|
||||||
|
@ -271,10 +268,8 @@ class WalletsHome extends StatelessWidget {
|
||||||
sub.reload();
|
sub.reload();
|
||||||
paymentPopup(context, repository.address!);
|
paymentPopup(context, repository.address!);
|
||||||
},
|
},
|
||||||
// onMove: ((details) => log.d('oooookkkkkkkk')),
|
|
||||||
onMove: (details) {
|
onMove: (details) {
|
||||||
if (repository.address! != myWalletProvider.lastFlyBy) {
|
if (repository.address! != myWalletProvider.lastFlyBy) {
|
||||||
log.d('oooookkkkkkkk: ${repository.address!}');
|
|
||||||
myWalletProvider.lastFlyBy = repository.address!;
|
myWalletProvider.lastFlyBy = repository.address!;
|
||||||
myWalletProvider.reload();
|
myWalletProvider.reload();
|
||||||
}
|
}
|
||||||
|
@ -370,16 +365,7 @@ class WalletsHome extends StatelessWidget {
|
||||||
? addNewDerivation(context)
|
? addNewDerivation(context)
|
||||||
: const Text('');
|
: 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)),
|
SliverToBoxAdapter(child: chestOptions(context, myWalletProvider)),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -413,14 +399,9 @@ class WalletsHome extends StatelessWidget {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
shape: const RoundedRectangleBorder(
|
shape: const RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.vertical(bottom: Radius.circular(12))),
|
borderRadius: BorderRadius.vertical(bottom: Radius.circular(12))),
|
||||||
// contentPadding: const EdgeInsets.only(left: 7.0),
|
|
||||||
tileColor: repository.address == defaultWallet.address
|
tileColor: repository.address == defaultWallet.address
|
||||||
? orangeC
|
? orangeC
|
||||||
: const Color(0xffFFD58D),
|
: const Color(0xffFFD58D),
|
||||||
// leading: Text('IMAGE'),
|
|
||||||
|
|
||||||
// subtitle: Text(_repository.split(':')[3],
|
|
||||||
// style: TextStyle(fontSize: 12.0, fontFamily: 'Monospace')),
|
|
||||||
title: Center(
|
title: Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.only(left: 5, right: 5, bottom: 35, top: 5),
|
padding: const EdgeInsets.only(left: 5, right: 5, bottom: 35, top: 5),
|
||||||
|
@ -435,13 +416,7 @@ class WalletsHome extends StatelessWidget {
|
||||||
: Colors.black),
|
: Colors.black),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// dense: true,
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// _walletOptions.readLocalWallet(
|
|
||||||
// context,
|
|
||||||
// _repository,
|
|
||||||
// _myWalletProvider.pinCode,
|
|
||||||
// pinLength);
|
|
||||||
walletOptions.getAddress(currentChestNumber, repository.derivation!);
|
walletOptions.getAddress(currentChestNumber, repository.derivation!);
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
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> {
|
class CustomClipperOval extends CustomClipper<Rect> {
|
||||||
@override
|
@override
|
||||||
Rect getClip(Size size) {
|
Rect getClip(Size size) {
|
||||||
|
|
|
@ -49,9 +49,6 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
|
|
||||||
sub.setCurrentWallet(defaultWallet);
|
sub.setCurrentWallet(defaultWallet);
|
||||||
|
|
||||||
// sub.spawnBlock();
|
|
||||||
// sub.spawnBlock(0, 25);
|
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: backgroundColor,
|
backgroundColor: backgroundColor,
|
||||||
resizeToAvoidBottomInset: true,
|
resizeToAvoidBottomInset: true,
|
||||||
|
@ -118,7 +115,7 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
height: buttonSize,
|
height: buttonSize,
|
||||||
child: ClipOval(
|
child: ClipOval(
|
||||||
child: Material(
|
child: Material(
|
||||||
color: yellowC, //const Color(0xffFFD58D), // button color
|
color: yellowC,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
key: keyViewActivity,
|
key: keyViewActivity,
|
||||||
splashColor: orangeC, // inkwell color
|
splashColor: orangeC, // inkwell color
|
||||||
|
@ -129,7 +126,6 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
'assets/walletOptions/clock.png'),
|
'assets/walletOptions/clock.png'),
|
||||||
height: 90)),
|
height: 90)),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// _historyProvider.nPage = 1;
|
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(builder: (context) {
|
MaterialPageRoute(builder: (context) {
|
||||||
|
@ -154,8 +150,7 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
Consumer<SubstrateSdk>(builder: (context, sub, _) {
|
||||||
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
WalletData? defaultWallet = myWalletProvider.getDefaultWallet();
|
||||||
return FutureBuilder(
|
return FutureBuilder(
|
||||||
future: sub.certState(defaultWallet.address!,
|
future: sub.certState(defaultWallet.address!, address!),
|
||||||
address!), // .canCertify(_defaultWallet.address!, pubkey!),
|
|
||||||
builder: (context, AsyncSnapshot<Map<String, int>> snapshot) {
|
builder: (context, AsyncSnapshot<Map<String, int>> snapshot) {
|
||||||
if (snapshot.data == null) return const SizedBox();
|
if (snapshot.data == null) return const SizedBox();
|
||||||
String duration = '';
|
String duration = '';
|
||||||
|
@ -207,11 +202,10 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
height: buttonSize,
|
height: buttonSize,
|
||||||
child: ClipOval(
|
child: ClipOval(
|
||||||
child: Material(
|
child: Material(
|
||||||
color:
|
color: const Color(0xffFFD58D),
|
||||||
const Color(0xffFFD58D), // button color
|
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
key: keyCertify,
|
key: keyCertify,
|
||||||
splashColor: orangeC, // inkwell color
|
splashColor: orangeC,
|
||||||
child: const Padding(
|
child: const Padding(
|
||||||
padding: EdgeInsets.only(bottom: 0),
|
padding: EdgeInsets.only(bottom: 0),
|
||||||
child: Image(
|
child: Image(
|
||||||
|
@ -293,10 +287,10 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
height: buttonSize,
|
height: buttonSize,
|
||||||
child: ClipOval(
|
child: ClipOval(
|
||||||
child: Material(
|
child: Material(
|
||||||
color: const Color(0xffFFD58D), // button color
|
color: const Color(0xffFFD58D),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
key: keyCopyAddress,
|
key: keyCopyAddress,
|
||||||
splashColor: orangeC, // inkwell color
|
splashColor: orangeC,
|
||||||
child: const Padding(
|
child: const Padding(
|
||||||
padding: EdgeInsets.all(20),
|
padding: EdgeInsets.all(20),
|
||||||
child: Image(
|
child: Image(
|
||||||
|
@ -334,7 +328,7 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
child: ClipOval(
|
child: ClipOval(
|
||||||
child: Material(
|
child: Material(
|
||||||
color: orangeC, // button color
|
color: orangeC,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
key: keyPay,
|
key: keyPay,
|
||||||
splashColor: yellowC,
|
splashColor: yellowC,
|
||||||
|
@ -342,7 +336,7 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
? () {
|
? () {
|
||||||
paymentPopup(context, address!);
|
paymentPopup(context, address!);
|
||||||
}
|
}
|
||||||
: null, // inkwell color
|
: null,
|
||||||
child: const Padding(
|
child: const Padding(
|
||||||
padding: EdgeInsets.all(14),
|
padding: EdgeInsets.all(14),
|
||||||
child: Image(
|
child: Image(
|
||||||
|
@ -400,8 +394,6 @@ class WalletViewScreen extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
void paymentPopup(BuildContext context, String toAddress) {
|
void paymentPopup(BuildContext context, String toAddress) {
|
||||||
// WalletsProfilesProvider _walletViewProvider =
|
|
||||||
// Provider.of<WalletsProfilesProvider>(context, listen: false);
|
|
||||||
final walletViewProvider =
|
final walletViewProvider =
|
||||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||||
|
|
||||||
|
@ -585,7 +577,6 @@ void paymentPopup(BuildContext context, String toAddress) {
|
||||||
color: Colors.grey[600]),
|
color: Colors.grey[600]),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
// const Spacer(flex: 1),
|
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 2),
|
const SizedBox(height: 2),
|
||||||
|
@ -598,7 +589,6 @@ void paymentPopup(BuildContext context, String toAddress) {
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// const Spacer(flex: 2),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -622,17 +612,13 @@ void paymentPopup(BuildContext context, String toAddress) {
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
onChanged: (_) => setState(() {
|
onChanged: (_) => setState(() {}),
|
||||||
// _walletViewProvider.reload();
|
|
||||||
}),
|
|
||||||
inputFormatters: <TextInputFormatter>[
|
inputFormatters: <TextInputFormatter>[
|
||||||
// FilteringTextInputFormatter.digitsOnly,
|
|
||||||
FilteringTextInputFormatter.deny(',',
|
FilteringTextInputFormatter.deny(',',
|
||||||
replacementString: '.'),
|
replacementString: '.'),
|
||||||
FilteringTextInputFormatter.allow(
|
FilteringTextInputFormatter.allow(
|
||||||
RegExp(r'(^\d+\.?\d{0,2})')),
|
RegExp(r'(^\d+\.?\d{0,2})')),
|
||||||
],
|
],
|
||||||
// onChanged: (v) => _searchProvider.reload(),
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: '0.00',
|
hintText: '0.00',
|
||||||
suffix: Text(isUdUnit
|
suffix: Text(isUdUnit
|
||||||
|
@ -640,10 +626,6 @@ void paymentPopup(BuildContext context, String toAddress) {
|
||||||
: currencyName), // udUnitDisplay(40),
|
: currencyName), // udUnitDisplay(40),
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: Colors.transparent,
|
fillColor: Colors.transparent,
|
||||||
// border: OutlineInputBorder(
|
|
||||||
// borderSide:
|
|
||||||
// BorderSide(color: Colors.grey[500], width: 2),
|
|
||||||
// borderRadius: BorderRadius.circular(8)),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderSide:
|
borderSide:
|
||||||
BorderSide(color: Colors.grey[500]!, width: 2),
|
BorderSide(color: Colors.grey[500]!, width: 2),
|
||||||
|
@ -657,7 +639,6 @@ void paymentPopup(BuildContext context, String toAddress) {
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// const SizedBox(height: 40),
|
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
|
|
Loading…
Reference in New Issue