circleName method

Widget circleName(
  1. BuildContext context,
  2. Size size,
  3. ZegoUIKitUser? user
)

Implementation

Widget circleName(BuildContext context, Size size, ZegoUIKitUser? user) {
  final userName = user?.name ?? '';
  return Container(
    decoration: const BoxDecoration(
      color: Color(0xffDBDDE3),
      shape: BoxShape.circle,
    ),
    child: Center(
      child: Text(
        userName.isNotEmpty ? userName.characters.first : '',
        style: TextStyle(
          fontSize: showSoundLevel ? size.width / 4 : size.width / 5 * 4,
          color: const Color(0xff222222),
          decoration: TextDecoration.none,
        ),
      ),
    ),
  );
}