widthInPercent function

double widthInPercent(
  1. double percent,
  2. BuildContext context
)

This constant function to distribute reuse function

Implementation

double widthInPercent(double percent, BuildContext context) {
  final toDouble = percent / 100;
  return MediaQuery.of(context).size.width * toDouble;
}