common_widgets.dart 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import 'package:flutter/material.dart';
  2. import 'package:fis_ui/index.dart';
  3. /// 通用组件
  4. class CommonWidgets {
  5. /// 设备异常提示
  6. static FWidget deviceUnavailableTip() {
  7. return FRow(
  8. children: [
  9. FText(
  10. "该设备异常",
  11. style: TextStyle(fontSize: 14, color: Colors.red, height: 1),
  12. ),
  13. FSizedBox(
  14. width: 5,
  15. ),
  16. FIcon(
  17. Icons.highlight_off_rounded,
  18. color: Colors.red,
  19. size: 18,
  20. ),
  21. ],
  22. );
  23. }
  24. /// 设备正常提示
  25. static FWidget deviceAvailableTip() {
  26. return FRow(
  27. crossAxisAlignment: CrossAxisAlignment.center,
  28. children: [
  29. FText(
  30. "该设备正常",
  31. style: TextStyle(fontSize: 14, color: Colors.green, height: 1),
  32. ),
  33. FSizedBox(
  34. width: 5,
  35. ),
  36. FIcon(
  37. Icons.check_circle_outline,
  38. color: Colors.green,
  39. size: 18,
  40. ),
  41. ],
  42. );
  43. }
  44. /// 找不到设备提示
  45. static FWidget deviceNotFoundTip() {
  46. return FContainer(
  47. child: FText(
  48. "未能找到可用的设备",
  49. style: TextStyle(fontSize: 14, color: Colors.grey, height: 1),
  50. ),
  51. );
  52. }
  53. }