/responsive_widgets_flutter

Widgets to make responsive designs for every device and every orientation. Ready to implement. Sounds null safety.

Primary LanguageDart

Flutter Widgets for Responsive Design

FEEL FREE TO CONTRIBUTE

DeterminerWidget

DeterminerWidget provides you to make different layouts for every device type and orientation.

Usage:

DeterminerWidget(
          portraitMobile: Text("Portrait Mobile"), //Portrait Mobile must be provided. Others can be optional.
          landscapeMobile: Text("Landscape Mobile"),
          portraitTablet: Text("Portrait Tablet"),
          landscapeTablet: Text("Landscape Tablet"),
          desktop: Text("Desktop"),
        )

InformerWidget

InformerWidget provides you all informations about screen. Informations are currently provided:

  • Screen size
  • Parent widget's size
  • Device type (Mobile,tablet,desktop)
  • Screen orientation

Usage:

InformerWidget(
                onPageBuild: (context, information) {
                  return Container(
                    //return a widget with informations
                    child: Text(information.toString()),
                    height: information.boundsSize.height * 0.5,
                    width: information.customDeviceType == CustomDeviceType.mobile ? 100 : 300,
                  );
                },
              )

Example photo