multi_x

Pub

Provide an easy way to make responsive and adaptive Flutter multi-platform applications.

Getting started

Add dependency

dependencies:
  multi_x: any

Features

This packages offers -

Widgets

  1. MxAdaptive - A widget that enables screen adaptation and scaling in Flutter applications.

  2. MxAdaptiveNavigation - MxAdaptiveNavigation is a wigdet which can be used for navigation throughout the app. On Small screen it use NavigationBar and on Large screen it use NavigationRail.

  3. MxResponsive - A widget that shows a child widget based on the screen size.

  4. MxDevice - A widget that shows a child widget based on the device window size either mobile or not.

  5. MxLayout - MxLayout is a type of LayoutBuilder with some additional power

  6. MxPlatform - A widget that shows a child widget based on the platform either Android or iOS or Desktop or Web.

  7. MxConditional - A widget that shows a child widget if a condition is true, otherwise shows another child widget.

  8. MxConditionalSwitch - A widget that shows a child widget based on switch case conditions.

Extensions

  1. mxColumns - Returns Material no. of Columns as per Material Design Guidelines.

  2. mxGutter - Returns Material no. of Gutter as per Material Design Guidelines.

  3. mxDeviceType - Returns DeviceType as per Device Screen Size.

  4. mxDeviceSize - Returns DeviceSize as per Device Screen Size.

  5. mxWindowSize - Returns current window size as per material design breakpoints.

  6. isMobileSize - Returns true if window size is of mobile.

  7. mq - Returns MediaQuery.of(context).

  8. screensize - Returns MediaQuery.of(context).size.

  9. devicePixelRatio - Returns MediaQuery.of(context).devicePixelRatio.

  10. screenPadding - Returns MediaQuery.of(context).padding.

  11. screenWidth - Returns MediaQuery.of(context).size.width.

  12. screenHeight - Returns MediaQuery.of(context).size.height.

  13. widthInPercent - Returns MQ width in percent.

  14. heightInPercent - Returns MQ height in percent.

  15. safeAreaHorizontal - Returns safe area horizontal padding.

  16. safeAreaVertical - Returns safe area vertical padding.

  17. safeAreaWidthInPercent - Returns safe area width in percent.

  18. safeAreaHeightInPercent - Returns safe area height in percent.

  19. heightTransformer() - Gives you the power to get a portion of the height.

  20. widthTransformer() - Gives you the power to get a portion of the width.

  21. ratio() - Divide the height/width proportionally by the given value.

  22. view - Returns the FlutterView that the provided context will render into.

  23. maybeView - Returns the FlutterView that the provided context will render into.

  24. orientation - Returns the orientation of the device using MediaQuery.

  25. isLandscape - Returns true if orientation is landscape.

  26. canShowNavigationRail - Returns true if orientation is landscape and width is greater than 800.

Utils

  1. Mx.isReleaseMode - Returns true if app is running in release mode.

  2. Mx.isDebugMode - Returns true if app is running in debug mode.

  3. Mx.isProfileMode - Returns true if app is running in profile mode.

  4. Mx.isWeb - Returns true if app is running on web.

  5. Mx.isDesktop - Returns true if app is running on desktop.

  6. Mx.isMobileOS - Returns true if app is running on mobile.

  7. Mx.isAndroid - Returns true if app is running on Android.

  8. Mx.isIOS - Returns true if app is running on iOS.

  9. Mx.isMacOS - Returns true if app is running on macOS.

  10. Mx.isWindows - Returns true if app is running on Windows.

  11. Mx.isLinux - Returns true if app is running on Linux.

  12. Mx.isFuchsia - Returns true if app is running on Fuchsia.

  13. Mx.setPathUrlStrategy() - Sets the path url strategy for web.

  14. Mx.setHashUrlStrategy() - Sets the hash url strategy for web.

Libraries

multi_x