Orientação gerada a partir de informações públicas. Apenas para referência.
Screentasia é um pacote Flutter projetado para simplificar a criação de interfaces responsivas e adaptativas em todos os tamanhos de tela e plataformas. Ele fornece ferramentas para layouts escaláveis, tipografia dinâmica e espaçamento consistente, garantindo que os designs fiquem impecáveis em Android, iOS, Web, macOS, Windows e Linux. Com utilitários integrados para lidar com diferentes densidades de tela e orientações, reduz o código boilerplate e agiliza o desenvolvimento responsivo. Ideal para aplicativos que exigem adaptação pixel-perfeito sem sacrificar a manutenibilidade.
Used to adapt sizes from chosen screen ex: if 500 width on a desktop is equal to 50% of the screen width, will be equal to 50% to all screens,also you can use custom screen with customScreen method
In this example we will use only width for all situations to use adaptive values,Of course we can apply that concept in (Height,Font,Padding,etc)
Example using Values
We can create adaptive value for (width,height,font,etc) based on value in specific device for example (Mobile,Tablet,Desktop) or specific device dimension ( width,height )
Screentasia().setWidth(540) (dart sdk>=2.6 ) another way (540.w) //Adapted to screen width
Screentasia().setHeight(200) (dart sdk>=2.6 ) another way (200.h) //Adapted to screen height, under normal circumstances, the height still uses x.w
Screentasia().radius(200) (dart sdk>=2.6 ) another way (200.r) //Adapt according to the smaller of width or height
Screentasia().setSp(24) (dart sdk>=2.6 ) another way (24.sp) //Adapter font
Screentasia().setPercentage(MediaQuery.sizeOf(context).width,50) (dart sdk>=2.6 : 50.wp) //Device width in Percentage, You can use Height just replace MediaQuery.sizeOf(context).width with MediaQuery.sizeOf(context).height
EdgeInsets.all(10).w //EdgeInsets.all(10.w)
EdgeInsets.only(left:8,right:8).r // EdgeInsets.only(left:8.r,right:8.r).
Radius.circular(16).w //Radius.circular(16.w)
BorderRadius.all(Radius.circular(16)).w
ap(tablet:50) //adaptive percentage, tablet 50 means that adaptive percentage 50% only on tablet screens, the default is 100% for all screens