Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As per your code by default screen size is fixed as xs , so we need all screen size based on conditions. #1

Open
AravinthC-18 opened this issue May 15, 2024 · 1 comment

Comments

@AravinthC-18
Copy link

AravinthC-18 commented May 15, 2024

Your code specifies a fixed screen size (xs).
File Name: bootstrap_theme.dart
image

In this code, you are using a fixed screen size, so if we try using a different screen size, such as a tablet or web, it does not adjust.

currentBreakPoint: _BootstrapBreakPoints.xs, screen-size: Size.fromWidth( _BootstrapBreakPoints.xs.maxWidth, ),

So we suggest better solutions for it. We made a few changes in the code that adapt to any screen size. I have made changes to your code and pasted it below.
File Name : bootstrap_theme.dart

currentBreakPoint: MediaQueryBuilder.BootStrapGetBreakPoint(), screenSize: Size.fromWidth( MediaQueryBuilder.BootStrapGetSize(), ),

image

media_query_builder.txt

Also, could you please add the following line to check the current screen size

` String getData(double width) {
String data = "";

if (width >= 0 && width <= 576) {
  data = "xs";
} else if (width >= 576 && width <= 768) {
  data = "sm";
} else if (width >= 768 && width <= 992) {
  data = "md";
} else if (width >= 992 && width <= 1200) {
  data = "lg";
} else if (width >= 1200 && width <= 1400) {
  data = "xl";
} else if (width >= 1400 && width <= double.infinity) {
  data = "xxl";
}
return data;

}`

@postboxat18
Copy link

I have used the flutterbootstrap5latest package in my project and made some code modifications to enhance its functionality. The changes I implemented include performance optimizations and better handling of responsiveness across various screen sizes, along with additional customization options for column spans. Please review the updated code and let me know if any further adjustments or issues need to be addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants