English 中文(简体)
这是最佳反应速度的技巧
原标题:which is the best technique for responsive flutter
  • 时间:2022-03-26 09:01:13
  •  标签:
  • flutter
creating responsive widget kinda isMobile?Fontsize 12 : fontsize 24 or use sizer package,what is the best responsive method for web,tablet,mobile?
问题回答
flutter documentation did give some solution but , not effective for all purposes AspectRatio CustomSingleChildLayout CustomMultiChildLayout FittedBox FractionallySizedBox LayoutBuilder MediaQuery MediaQueryData OrientationBuilder if we using one by one , all methods have it s own defects . mobile side and tablet side it will work , but in the case of windows and web , it won t. if we combine these methods , also get some responsive issue , because of all methods are depend on the device height ,device width ,device aspectRatio , device Offset , also so much plugins are available but they have defects too , in the case of flutter_screenutil it depend on width , height . so if changes in one of the property it won t count. that means it won t change layout in web so i am using this way combine 4 methods together flutter_screenutil , LayoutBuilder , MediaQuery , AspectRatio by using this way we can achieve,maintain the 3 layouts in one code please use wisely according to your use case
the best place to find FLUTTER solutions/documentations is the official flutter/dart websites. For this question: Creating responsive and adaptive apps
you might want to check out the flexi_ui package. It’s designed to solve issues in Flutter responsive design. With flexi_ui, you can make any design responsive by using its built-in functions. Additionally, it allows you to use Figma values to target two values based on the device, making it highly versatile for various screen sizes and orientations. This package could be exactly what you need for a seamless and adaptive UI in your Flutter applications! https://pub.dev/packages/flexi_ui




相关问题
Flutter App cannot be installed on Android TV

I m building a Flutter app that should support Android TV and Mobile devices. Despite Google Play shows that it is supported, I cannot install app on my MiBox device. While trying to install it, both ...

Moving the icon button to the right causes rendering issues

I am trying to align the icon button to the right of the Text field, I tried the row which made the icon button not centered vertically and now I am trying out the Stack widget. Here is my code - ...

热门标签