G-EIP-700-TLS-7-1-eip-steph.../lib/classes/displayAvatar.dart

32 lines
680 B
Dart
Raw Permalink Normal View History

2024-10-25 11:26:44 +00:00
// displayAvatar.dart
2024-09-16 15:07:04 +00:00
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,
),
),
],
);
}
}