Home > database >  flutter, How to write precise responsive code from design
flutter, How to write precise responsive code from design

Time:04-19

Is there any proper method to write responsive app without any additional package? I usually use MediaQuery but I feel it's not proper enough because it's hard to measure the size from figma since figma use number so i have to calculate it but im afraid everytime i calculate it's not precise and for the font size what is used to make it responsive?

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

CodePudding user response:

Flutter handles some of its "responsiveness" internally, but I would recommend you read on responsive design in flutter here https://docs.flutter.dev/development/ui/layout/adaptive-responsive. You can also check https://pub.dev for packages that can help you with more complex user interfaces.

  • Related