30 lines
806 B
Dart
30 lines
806 B
Dart
import 'package:auto_size_text/auto_size_text.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:gascom/constants/app_theme.dart';
|
|
|
|
class TextContainer extends StatelessWidget {
|
|
const TextContainer({super.key, required this.text});
|
|
|
|
final String text;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
width: double.infinity,
|
|
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 20),
|
|
decoration: BoxDecoration(
|
|
color: Colors.transparent,
|
|
borderRadius: BorderRadius.circular(20),
|
|
border: Border.all(
|
|
color: AppTheme.textColor,
|
|
width: 1,
|
|
),
|
|
),
|
|
child: AutoSizeText(
|
|
text,
|
|
style: Theme.of(context).textTheme.bodySmall,
|
|
minFontSize: 8,
|
|
),
|
|
);
|
|
}
|
|
} |