import 'package:flutter/material.dart';
import 'dart:math' as math;

// Esta extensão adiciona o superpoder "sf" ao BuildContext
extension SizeExtension on BuildContext {
  
  double get sf {
    final double wScreen = MediaQuery.of(this).size.width;
    final double hScreen = MediaQuery.of(this).size.height;
    
    // Calcula e devolve a escala na hora!
    return math.min(wScreen, hScreen) / 400;
  }
  
}