twonly-app/lib/src/components/verified_shield.dart
2025-03-16 20:51:38 +01:00

37 lines
1 KiB
Dart

import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:twonly/src/database/twonly_database.dart';
class VerifiedShield extends StatelessWidget {
final Contact contact;
final double size;
const VerifiedShield(this.contact, {super.key, this.size = 18});
@override
Widget build(BuildContext context) {
return GestureDetector(
// onTap: () {
// Navigator.push(context, MaterialPageRoute(
// builder: (context) {
// return ContactVerifyView(contact);
// },
// ));
// },
child: Tooltip(
message: contact.verified
? "You verified this contact"
: "You have not verifies this contact.",
child: FaIcon(
contact.verified
? FontAwesomeIcons.shieldHeart
: Icons.gpp_maybe_rounded,
color: contact.verified
? Theme.of(context).colorScheme.primary
: Colors.red,
size: size,
),
),
);
}
}