Newer
Older
import 'package:easy_localization/easy_localization.dart';
import 'package:gecko/globals.dart';
import 'package:flutter/material.dart';
import 'package:gecko/widgets/certs_received.dart';
import 'package:gecko/widgets/certs_counter.dart';
const CertificationsScreen(
{Key? key, required this.address, required this.username})
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: backgroundColor,
appBar: AppBar(
child: Text('certificationsOf'.tr(args: [username])),
maxOpenSections: 1,
headerBackgroundColorOpened: orangeC,
scaleWhenAnimating: true,
openAndCloseAnimation: true,
headerPadding:
const EdgeInsets.symmetric(vertical: 7, horizontal: 15),
sectionOpeningHapticFeedback: SectionHapticFeedback.heavy,
sectionClosingHapticFeedback: SectionHapticFeedback.light,
children: [
AccordionSection(
isOpen: true,
leftIcon:
const Icon(Icons.insights_rounded, color: Colors.black),
headerBackgroundColor: yellowC,
headerBackgroundColorOpened: orangeC,
header: Row(children: [
Text(
'received'.tr(),
style: const TextStyle(fontSize: 20),
),
const SizedBox(width: 5),
CertsCounter(address: address)
]),
content: CertsReceived(address: address),
contentHorizontalPadding: 0,
contentBorderWidth: 1,
),
AccordionSection(
isOpen: false,
leftIcon:
const Icon(Icons.insights_rounded, color: Colors.black),
headerBackgroundColor: yellowC,
headerBackgroundColorOpened: orangeC,
header: Row(children: [
Text(
'sent'.tr(),
style: const TextStyle(fontSize: 20),
),
const SizedBox(width: 5),
CertsCounter(address: address, isSent: true)
]),
content: CertsSent(address: address),
contentHorizontalPadding: 20,
contentBorderWidth: 1,
// onOpenSection: () => print('onOpenSection ...'),
// onCloseSection: () => print('onCloseSection ...'),
),
]),