meshcore-open/lib/widgets/unread_badge.dart
446564 b34d684e67 format dart files
formats all dart files using `dart format .` from the root project dir

this makes the code style repeatable by new contributors and makes PR review easier
2026-02-04 08:32:35 -08:00

27 lines
683 B
Dart

import 'package:flutter/material.dart';
class UnreadBadge extends StatelessWidget {
final int count;
const UnreadBadge({super.key, required this.count});
@override
Widget build(BuildContext context) {
final display = count > 99 ? '99+' : count.toString();
return Container(
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2),
decoration: BoxDecoration(
color: Colors.redAccent,
borderRadius: BorderRadius.circular(10),
),
child: Text(
display,
style: const TextStyle(
color: Colors.white,
fontSize: 11,
fontWeight: FontWeight.w600,
),
),
);
}
}