label.dart 868 B

1234567891011121314151617181920212223242526272829
  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(color: Theme.of(context).accentColor, borderRadius: BorderRadius.circular(10)),
  17. ),
  18. Padding(
  19. padding: const EdgeInsets.only(left: 6.0),
  20. child: Text(title, style: Theme.of(context).textTheme.headline3, strutStyle: fixedLine,),
  21. ),
  22. ],
  23. ));
  24. }
  25. }