Skip to content
Snippets Groups Projects
Commit 9f014480 authored by poka's avatar poka
Browse files

feat: show certifications on membre wallet tule

parent bad65f55
No related branches found
No related tags found
No related merge requests found
...@@ -20,14 +20,10 @@ class CertTile extends StatelessWidget { ...@@ -20,14 +20,10 @@ class CertTile extends StatelessWidget {
return Column( return Column(
children: listCerts.map((repository) { children: listCerts.map((repository) {
// log.d('bbbbbbbbbbbbbbbbbbbbbb: ' + repository.toString());
return Column(children: <Widget>[ return Column(children: <Widget>[
Padding( Padding(
padding: const EdgeInsets.only(right: 0), padding: const EdgeInsets.only(right: 0),
child: child: ListTile(
// Row(children: [Column(children: [],)],)
ListTile(
key: keyTransaction(keyID++), key: keyTransaction(keyID++),
contentPadding: const EdgeInsets.only( contentPadding: const EdgeInsets.only(
left: 20, right: 30, top: 15, bottom: 15), left: 20, right: 30, top: 15, bottom: 15),
......
...@@ -23,14 +23,15 @@ class Certifications extends StatelessWidget { ...@@ -23,14 +23,15 @@ class Certifications extends StatelessWidget {
return certs.data != null return certs.data != null
? Row( ? Row(
children: [ children: [
Image.asset('assets/medal.png', height: 20), Image.asset('assets/medal.png',
color: color, height: 20),
const SizedBox(width: 1), const SizedBox(width: 1),
Text(certs.data?[0].toString() ?? '0', Text(certs.data?[0].toString() ?? '0',
style: const TextStyle(fontSize: 20)), style: TextStyle(fontSize: 20, color: color)),
const SizedBox(width: 5), const SizedBox(width: 5),
Text( Text(
"(${certs.data?[1].toString() ?? '0'})", "(${certs.data?[1].toString() ?? '0'})",
style: const TextStyle(fontSize: 14), style: TextStyle(fontSize: 14, color: color),
) )
], ],
) )
......
...@@ -6,6 +6,7 @@ import 'package:gecko/models/widgets_keys.dart'; ...@@ -6,6 +6,7 @@ import 'package:gecko/models/widgets_keys.dart';
import 'package:gecko/providers/my_wallets.dart'; import 'package:gecko/providers/my_wallets.dart';
import 'package:gecko/screens/myWallets/wallet_options.dart'; import 'package:gecko/screens/myWallets/wallet_options.dart';
import 'package:gecko/widgets/balance.dart'; import 'package:gecko/widgets/balance.dart';
import 'package:gecko/widgets/certifications.dart';
import 'package:gecko/widgets/commons/smooth_transition.dart'; import 'package:gecko/widgets/commons/smooth_transition.dart';
import 'package:gecko/widgets/name_by_address.dart'; import 'package:gecko/widgets/name_by_address.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
...@@ -48,7 +49,9 @@ class WalletTileMembre extends StatelessWidget { ...@@ -48,7 +49,9 @@ class WalletTileMembre extends StatelessWidget {
borderRadius: const BorderRadius.all(Radius.circular(12)), borderRadius: const BorderRadius.all(Radius.circular(12)),
child: Column(children: <Widget>[ child: Column(children: <Widget>[
Expanded( Expanded(
child: Container( child: Stack(
children: [
Container(
width: double.infinity, width: double.infinity,
height: double.infinity, height: double.infinity,
decoration: const BoxDecoration( decoration: const BoxDecoration(
...@@ -79,32 +82,51 @@ class WalletTileMembre extends StatelessWidget { ...@@ -79,32 +82,51 @@ class WalletTileMembre extends StatelessWidget {
), ),
), ),
), ),
)), ),
Positioned(
left: 25,
top: 25,
child: Opacity(
opacity: 0.6,
child: Image.asset('assets/medal.png',
color: Colors.black, height: 40),
),
),
],
),
),
Stack(children: <Widget>[ Stack(children: <Widget>[
BalanceBuilder( BalanceBuilder(
address: repository.address, address: repository.address,
isDefault: repository.address == defaultWallet.address), isDefault: repository.address == defaultWallet.address),
Row( Row(mainAxisAlignment: MainAxisAlignment.center, children: [
mainAxisAlignment: MainAxisAlignment.center, Column(children: [
children: [ const SizedBox(height: 10),
Column(
children: [
const SizedBox(height: 7),
Opacity( Opacity(
opacity: 0.7, opacity: 0.7,
child: NameByAddress( child: NameByAddress(
wallet: repository, wallet: repository,
size: 20, size: 20,
color: color: defaultWallet.address == repository.address
defaultWallet.address == repository.address
? Colors.white ? Colors.white
: Colors.black, : Colors.black,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
)) ))
], ]),
]),
Positioned(
right: 25,
top: 25,
child: Opacity(
opacity: 0.7,
child: Certifications(
address: repository.address,
color: defaultWallet.address == repository.address
? Colors.white
: Colors.black,
size: 15),
), ),
],
), ),
]), ]),
]), ]),
...@@ -133,7 +155,7 @@ class BalanceBuilder extends StatelessWidget { ...@@ -133,7 +155,7 @@ class BalanceBuilder extends StatelessWidget {
color: isDefault ? orangeC : yellowC, color: isDefault ? orangeC : yellowC,
child: Padding( child: Padding(
padding: padding:
const EdgeInsets.only(left: 5, right: 5, top: 45, bottom: 10), const EdgeInsets.only(left: 5, right: 5, top: 45, bottom: 15),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment