label.dart 967 B

12345678910111213141516171819202122232425262728293031323334
  1. import 'package:flutter/material.dart';
  2. import 'package:sport/widgets/misc.dart';
  3. class LabelWidget extends StatelessWidget {
  4. final String title;
  5. LabelWidget({required this.title});
  6. @override
  7. Widget build(BuildContext context) {
  8. return Container(
  9. padding: EdgeInsets.fromLTRB(12.0, 6.0, 12.0, 6.0),
  10. child: Row(
  11. crossAxisAlignment: CrossAxisAlignment.center,
  12. children: <Widget>[
  13. Container(
  14. width: 10,
  15. height: 10,
  16. decoration: BoxDecoration(
  17. color: Theme.of(context).accentColor,
  18. borderRadius: BorderRadius.circular(10)),
  19. ),
  20. Padding(
  21. padding: const EdgeInsets.only(left: 6.0),
  22. child: Text(
  23. title,
  24. style: Theme.of(context).textTheme.headline3,
  25. strutStyle: fixedLine,
  26. ),
  27. ),
  28. ],
  29. ));
  30. }
  31. }