This repository has been archived on 2024-11-18. You can view files and clone it, but cannot push or open issues or pull requests.
dialer/lib/classes/displayAvatar.dart
2024-09-16 18:07:04 +03:00

30 lines
657 B
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,
),
),
],
);
}
}