import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:flutter/material.dart';

import '../app_texts_widget.dart';

class TextFieldsError extends StatelessWidget {
  const TextFieldsError({
    Key key,
    @required  this.error,
  }) : super(key: key);

  final String error;


  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(top: 8, right: 8, left: 8, bottom: 8),
      child: Row(
        children: [
          Icon(
            DoctorApp.warning,
            size: 20,
            color: Colors.red.shade700,
          ),
          SizedBox(
            width: 12,
          ),
          AppText(
            error,
            fontFamily: 'Poppins',
            fontSize: SizeConfig.textMultiplier * 1.7,
            color: Colors.red.shade700,
            fontWeight: FontWeight.w700,
          ),
        ],
      ),
    );
  }
}
