mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
Update SpaceDetailsDialog to utilize SelectableText for error messages and ensure proper Bloc context usage. This enhances user experience by allowing text selection for easier copying of error information.
This commit is contained in:
@ -58,6 +58,7 @@ class _SpaceDetailsDialogState extends State<SpaceDetailsDialog> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return BlocBuilder<SpaceDetailsBloc, SpaceDetailsState>(
|
return BlocBuilder<SpaceDetailsBloc, SpaceDetailsState>(
|
||||||
|
bloc: widget.context.read<SpaceDetailsBloc>(),
|
||||||
builder: (context, state) => switch (state) {
|
builder: (context, state) => switch (state) {
|
||||||
SpaceDetailsInitial() => _buildLoadingDialog(),
|
SpaceDetailsInitial() => _buildLoadingDialog(),
|
||||||
SpaceDetailsLoading() => _buildLoadingDialog(),
|
SpaceDetailsLoading() => _buildLoadingDialog(),
|
||||||
@ -86,7 +87,7 @@ class _SpaceDetailsDialogState extends State<SpaceDetailsDialog> {
|
|||||||
title: widget.title,
|
title: widget.title,
|
||||||
backgroundColor: ColorsManager.whiteColors,
|
backgroundColor: ColorsManager.whiteColors,
|
||||||
content: Center(
|
content: Center(
|
||||||
child: Text(
|
child: SelectableText(
|
||||||
errorMessage,
|
errorMessage,
|
||||||
style: context.textTheme.bodyLarge?.copyWith(
|
style: context.textTheme.bodyLarge?.copyWith(
|
||||||
color: ColorsManager.red,
|
color: ColorsManager.red,
|
||||||
|
Reference in New Issue
Block a user