added error messages everywhere.

This commit is contained in:
Faris Armoush
2025-05-07 11:43:05 +03:00
parent 38ff20f86a
commit 4e3e63723e
6 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,26 @@
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: Text(
'$errorMessage',
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context.textTheme.bodySmall?.copyWith(
color: ColorsManager.red,
fontWeight: FontWeight.w400,
fontSize: 8,
),
),
);
}
}