import 'package:flutter/material.dart';
import 'package:rkm/widgets/text_default.dart';

class ErrorDefault extends StatelessWidget {
  double widthDefault;
  String error;

  ErrorDefault({
    this.widthDefault = 0.7,
    this.error = 'Esse campo é obrigatório!'
  });
  @override
  Widget build(BuildContext context) {

    double height = MediaQuery.of(context).size.height;
    double width = MediaQuery.of(context).size.width;

    return Container(
      height: 20,
      width: width*widthDefault,
      child: Column(
        children: [
          Divider(color: Colors.red,height: 2,thickness:2),
          Container(
            height: 15,
            width: width*widthDefault,
            child: TextDefault(text:error,color: Colors.red,fontSize: 12),
          ),
        ],
      ),
    );
  }
}
