You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.0KB

  1. import 'package:flutter/material.dart';
  2. class WidgetRowPlotInfo extends StatelessWidget {
  3. final Color color;
  4. final String name;
  5. final String value;
  6. WidgetRowPlotInfo({
  7. required this.color,
  8. required this.name,
  9. required this.value,
  10. });
  11. @override
  12. Widget build(BuildContext context) {
  13. return Container(
  14. color: color,
  15. child: IntrinsicHeight(
  16. child: Row(
  17. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  18. children: [
  19. Expanded(
  20. child: Container(
  21. padding: EdgeInsets.all(12),
  22. child: Text(
  23. name,
  24. style: TextStyle(fontSize: 16),
  25. ),
  26. ),
  27. ),
  28. Container(
  29. color: Colors.white,
  30. width: 2,
  31. ),
  32. Expanded(
  33. child: Container(padding: EdgeInsets.all(12), child: Text(value ?? '--', textAlign: TextAlign.end, style: TextStyle(fontSize: 16))),
  34. ),
  35. ],
  36. ),
  37. ),
  38. );
  39. }
  40. }