Files
zapstore/lib/widgets/pill_widget.dart
T

35 lines
817 B
Dart

import 'package:flutter/material.dart';
class PillWidget extends StatelessWidget {
final String text;
final Color color;
final double size;
const PillWidget(
{super.key,
required this.text,
this.color = Colors.blue,
this.size = 13});
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(horizontal: size, vertical: 6),
decoration: BoxDecoration(
color: color,
borderRadius: BorderRadius.circular(size * 1.1),
),
child: Text(
text,
maxLines: 1,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: size,
fontWeight: FontWeight.bold,
),
),
);
}
}