import 'package:flutter/material.dart'; import 'package:fis_ui/index.dart'; /// 通用组件 class CommonWidgets { /// 设备异常提示 static FWidget deviceUnavailableTip() { return FRow( children: [ FText( "该设备异常", style: TextStyle(fontSize: 14, color: Colors.red, height: 1), ), FSizedBox( width: 5, ), FIcon( Icons.highlight_off_rounded, color: Colors.red, size: 18, ), ], ); } /// 设备正常提示 static FWidget deviceAvailableTip() { return FRow( crossAxisAlignment: CrossAxisAlignment.center, children: [ FText( "该设备正常", style: TextStyle(fontSize: 14, color: Colors.green, height: 1), ), FSizedBox( width: 5, ), FIcon( Icons.check_circle_outline, color: Colors.green, size: 18, ), ], ); } /// 找不到设备提示 static FWidget deviceNotFoundTip() { return FContainer( child: FText( "未能找到可用的设备", style: TextStyle(fontSize: 14, color: Colors.grey, height: 1), ), ); } }