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 { String error; CustomValidationError({ Key key, this.error, }) : super(key: key); @override Widget build(BuildContext context) { if (error == null) error = TranslationBase.of(context).emptyMessage; return Column( children: [ SizedBox( height: 2, ), Container( margin: EdgeInsets.symmetric(horizontal: 3), child: AppText( error, color: Theme.of(context).errorColor, fontSize: 14, ), ), ], ); } }