ui: improve error readablity

This commit is contained in:
Simon Ding
2024-11-05 12:43:17 +08:00
parent 949b6e5188
commit f1c4e306f4
13 changed files with 44 additions and 26 deletions

View File

@@ -281,3 +281,23 @@ class _LoadingTextButtonState extends State<LoadingTextButton> {
);
}
}
class PoError extends StatelessWidget {
const PoError({super.key, required this.msg, required this.err});
final String msg;
final dynamic err;
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("$msg ", style: TextStyle(color:Theme.of(context).colorScheme.error),),
Tooltip(
message: "$err",
child: Icon(Icons.info,color: Theme.of(context).colorScheme.error,),
)
],
);
}
}