32 lines
680 B
Dart
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,
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|