feat: show certifications on membre wallet tule
This commit is contained in:
parent
bad65f559b
commit
9f0144803f
|
@ -20,66 +20,62 @@ class CertTile extends StatelessWidget {
|
|||
|
||||
return Column(
|
||||
children: listCerts.map((repository) {
|
||||
// log.d('bbbbbbbbbbbbbbbbbbbbbb: ' + repository.toString());
|
||||
|
||||
return Column(children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 0),
|
||||
child:
|
||||
// Row(children: [Column(children: [],)],)
|
||||
ListTile(
|
||||
key: keyTransaction(keyID++),
|
||||
contentPadding: const EdgeInsets.only(
|
||||
left: 20, right: 30, top: 15, bottom: 15),
|
||||
leading: ClipOval(
|
||||
child: defaultAvatar(avatarSize),
|
||||
child: ListTile(
|
||||
key: keyTransaction(keyID++),
|
||||
contentPadding: const EdgeInsets.only(
|
||||
left: 20, right: 30, top: 15, bottom: 15),
|
||||
leading: ClipOval(
|
||||
child: defaultAvatar(avatarSize),
|
||||
),
|
||||
title: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 5),
|
||||
child: Text(repository['name'],
|
||||
style: const TextStyle(fontSize: 22)),
|
||||
),
|
||||
subtitle: RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
color: Colors.grey[700],
|
||||
),
|
||||
title: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 5),
|
||||
child: Text(repository['name'],
|
||||
style: const TextStyle(fontSize: 22)),
|
||||
),
|
||||
subtitle: RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
color: Colors.grey[700],
|
||||
),
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: repository['date'],
|
||||
),
|
||||
if (repository[2] != '')
|
||||
TextSpan(
|
||||
text: ' · ',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
color: Colors.grey[550],
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: getShortPubkey(repository['address']),
|
||||
style: TextStyle(
|
||||
fontStyle: FontStyle.italic,
|
||||
color: Colors.grey[600],
|
||||
fontSize: 18),
|
||||
),
|
||||
],
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: repository['date'],
|
||||
),
|
||||
),
|
||||
dense: false,
|
||||
isThreeLine: false,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
homeContext,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return WalletViewScreen(
|
||||
address: repository['address'],
|
||||
username: repository['name'],
|
||||
);
|
||||
}),
|
||||
if (repository[2] != '')
|
||||
TextSpan(
|
||||
text: ' · ',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
color: Colors.grey[550],
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: getShortPubkey(repository['address']),
|
||||
style: TextStyle(
|
||||
fontStyle: FontStyle.italic,
|
||||
color: Colors.grey[600],
|
||||
fontSize: 18),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
dense: false,
|
||||
isThreeLine: false,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
homeContext,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
return WalletViewScreen(
|
||||
address: repository['address'],
|
||||
username: repository['name'],
|
||||
);
|
||||
}),
|
||||
);
|
||||
}),
|
||||
),
|
||||
]);
|
||||
}).toList());
|
||||
|
|
|
@ -23,14 +23,15 @@ class Certifications extends StatelessWidget {
|
|||
return certs.data != null
|
||||
? Row(
|
||||
children: [
|
||||
Image.asset('assets/medal.png', height: 20),
|
||||
Image.asset('assets/medal.png',
|
||||
color: color, height: 20),
|
||||
const SizedBox(width: 1),
|
||||
Text(certs.data?[0].toString() ?? '0',
|
||||
style: const TextStyle(fontSize: 20)),
|
||||
style: TextStyle(fontSize: 20, color: color)),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"(${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';
|
|||
import 'package:gecko/providers/my_wallets.dart';
|
||||
import 'package:gecko/screens/myWallets/wallet_options.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/name_by_address.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -48,63 +49,84 @@ class WalletTileMembre extends StatelessWidget {
|
|||
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||
child: Column(children: <Widget>[
|
||||
Expanded(
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
decoration: const BoxDecoration(
|
||||
gradient: RadialGradient(
|
||||
radius: 0.8,
|
||||
colors: [
|
||||
Color.fromARGB(255, 255, 255, 211),
|
||||
yellowC,
|
||||
],
|
||||
),
|
||||
),
|
||||
child: repository.imageCustomPath == null ||
|
||||
repository.imageCustomPath == ''
|
||||
? Image.asset(
|
||||
'assets/avatars/${repository.imageDefaultPath}',
|
||||
alignment: Alignment.bottomCenter,
|
||||
scale: 0.5,
|
||||
)
|
||||
: Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.transparent,
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fitHeight,
|
||||
image: FileImage(
|
||||
File(repository.imageCustomPath!),
|
||||
),
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
decoration: const BoxDecoration(
|
||||
gradient: RadialGradient(
|
||||
radius: 0.8,
|
||||
colors: [
|
||||
Color.fromARGB(255, 255, 255, 211),
|
||||
yellowC,
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
child: repository.imageCustomPath == null ||
|
||||
repository.imageCustomPath == ''
|
||||
? Image.asset(
|
||||
'assets/avatars/${repository.imageDefaultPath}',
|
||||
alignment: Alignment.bottomCenter,
|
||||
scale: 0.5,
|
||||
)
|
||||
: Container(
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.transparent,
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fitHeight,
|
||||
image: FileImage(
|
||||
File(repository.imageCustomPath!),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 25,
|
||||
top: 25,
|
||||
child: Opacity(
|
||||
opacity: 0.6,
|
||||
child: Image.asset('assets/medal.png',
|
||||
color: Colors.black, height: 40),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Stack(children: <Widget>[
|
||||
BalanceBuilder(
|
||||
address: repository.address,
|
||||
isDefault: repository.address == defaultWallet.address),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
const SizedBox(height: 7),
|
||||
Opacity(
|
||||
opacity: 0.7,
|
||||
child: NameByAddress(
|
||||
wallet: repository,
|
||||
size: 20,
|
||||
color:
|
||||
defaultWallet.address == repository.address
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontStyle: FontStyle.normal,
|
||||
))
|
||||
],
|
||||
),
|
||||
],
|
||||
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Column(children: [
|
||||
const SizedBox(height: 10),
|
||||
Opacity(
|
||||
opacity: 0.7,
|
||||
child: NameByAddress(
|
||||
wallet: repository,
|
||||
size: 20,
|
||||
color: defaultWallet.address == repository.address
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
fontWeight: FontWeight.w600,
|
||||
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 {
|
|||
color: isDefault ? orangeC : yellowC,
|
||||
child: 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(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
|
Loading…
Reference in New Issue