You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RSGDoctorApp/lib/widgets/shared/user-guid/custom_validation_error.dart

34 lines
821 B
Dart

4 years ago
import 'package:doctor_app_flutter/utils/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart';
// ignore: must_be_immutable
class CustomValidationError extends StatelessWidget {
5 years ago
String error;
CustomValidationError({
5 years ago
Key key,
this.error,
}) : super(key: key);
@override
Widget build(BuildContext context) {
5 years ago
if (error == null) error = TranslationBase.of(context).emptyMessage;
return Column(
children: [
SizedBox(
height: 2,
),
Container(
margin: EdgeInsets.symmetric(horizontal: 3),
5 years ago
child: AppText(
error,
color: Theme.of(context).errorColor,
fontSize: 14,
),
),
],
);
}
5 years ago
}