Skip to content

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

@AravinthC-18

Description

@AravinthC-18

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;

}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions