G-EIP-700-TLS-7-1-eip-steph.../lib/classes/displayAvatar.dart
2024-10-25 12:26:44 +01:00

32 lines
680 B
Dart

// displayAvatar.dart
import 'package:dialer/classes/contactClass.dart';
import 'package:flutter/material.dart';
class DisplayAvatar extends StatelessWidget {
final Contact contact;
const DisplayAvatar({super.key, required this.contact});
@override
Widget build(BuildContext context) {
return Stack(
children: <Widget>[
CircleAvatar(
child: Text(contact.name[0]),
),
if (contact.isLocked)
const Positioned(
right: 0,
bottom: 0,
child: Icon(
Icons.lock,
color: Colors.white,
size: 20.0,
),
),
],
);
}
}