setSizeWidget method

Widget setSizeWidget(
  1. BuildContext context,
  2. GlobalKey<State<StatefulWidget>> key,
  3. String text,
  4. double margin,
  5. double fontSize,
)

Implementation

Widget setSizeWidget(
  BuildContext context,
  GlobalKey key,
  String text,
  double margin,
  double fontSize,
) {
  return SafeArea(
    child: Container(
      alignment: Alignment.topLeft,
      width: MediaQuery.of(context).size.width - margin,
      child: Text(
        key: key,
        text,
        style: TextStyle(
          fontSize: fontSize,
        ),
      ),
    ),
  );
}