mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
30 lines
888 B
Dart
30 lines
888 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:syncrow_web/utils/color_manager.dart';
|
|
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
|
|
|
class AnalyticsErrorWidget extends StatelessWidget {
|
|
const AnalyticsErrorWidget(this.errorMessage, {super.key});
|
|
|
|
final String? errorMessage;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Visibility(
|
|
visible: errorMessage != null || (errorMessage?.isNotEmpty ?? false),
|
|
child: Padding(
|
|
padding: const EdgeInsetsDirectional.only(bottom: 10),
|
|
child: Text(
|
|
errorMessage ?? 'Something went wrong',
|
|
maxLines: 1,
|
|
overflow: TextOverflow.ellipsis,
|
|
style: context.textTheme.bodySmall?.copyWith(
|
|
color: ColorsManager.red,
|
|
fontWeight: FontWeight.w400,
|
|
fontSize: 8,
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|