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.

43 lines
1.1KB

  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, @required this.name, @required this.value});
  8. @override
  9. Widget build(BuildContext context) {
  10. return Container(
  11. color: color,
  12. child: IntrinsicHeight(
  13. child: Row(
  14. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  15. children: [
  16. Expanded(
  17. child: Container(
  18. padding: EdgeInsets.all(12),
  19. child: Text(
  20. name,
  21. style: TextStyle(fontSize: 16),
  22. ),
  23. ),
  24. ),
  25. Container(
  26. color: Colors.white,
  27. width: 2,
  28. ),
  29. Expanded(
  30. child: Container(
  31. padding: EdgeInsets.all(12),
  32. child: Text(value ?? '--',
  33. textAlign: TextAlign.end,
  34. style: TextStyle(fontSize: 16))),
  35. ),
  36. ],
  37. ),
  38. ),
  39. );
  40. }
  41. }