### Install Responsive Framework Source: https://github.com/codelessly/responsiveframework/blob/master/README.md Add the dependency to your pubspec.yaml file. ```yaml responsive_framework: ^latest_version ``` -------------------------------- ### ResponsiveRowColumn Column Layout Example Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_row_column.md Example implementation of a column layout with specific alignment and spacing. ```dart ResponsiveRowColumn( layout: ResponsiveRowColumnType.COLUMN, columnMainAxisAlignment: MainAxisAlignment.start, columnCrossAxisAlignment: CrossAxisAlignment.stretch, columnSpacing: 12.0, columnPadding: EdgeInsets.all(16.0), children: [ ResponsiveRowColumnItem( columnFlex: 1, child: Header(), ), ResponsiveRowColumnItem( columnFlex: 2, child: Content(), ), ResponsiveRowColumnItem( child: Footer(), ), ], ) ``` -------------------------------- ### ResponsiveRowColumn Row Layout Example Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_row_column.md Example implementation of a row layout with specific alignment and spacing. ```dart ResponsiveRowColumn( layout: ResponsiveRowColumnType.ROW, rowMainAxisAlignment: MainAxisAlignment.spaceBetween, rowCrossAxisAlignment: CrossAxisAlignment.center, rowSpacing: 16.0, rowPadding: EdgeInsets.all(8.0), children: [ ResponsiveRowColumnItem( rowFlex: 2, child: Container(color: Colors.blue, height: 100), ), ResponsiveRowColumnItem( rowFlex: 1, child: Container(color: Colors.red, height: 100), ), ], ) ``` -------------------------------- ### Basic Breakpoint Creation Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/breakpoint.md Examples of defining standard breakpoints for different device categories. ```dart const Breakpoint(start: 0, end: 450, name: 'MOBILE') const Breakpoint(start: 451, end: 800, name: 'TABLET') const Breakpoint(start: 801, end: 1920, name: 'DESKTOP') const Breakpoint(start: 1921, end: double.infinity, name: '4K') ``` -------------------------------- ### Setup ResponsiveBreakpoints Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/README.md Initialize the framework within the MaterialApp builder to define global breakpoints for the application. ```dart MaterialApp( builder: (context, child) => ResponsiveBreakpoints.builder( child: child!, breakpoints: [ const Breakpoint(start: 0, end: 450, name: MOBILE), const Breakpoint(start: 451, end: 800, name: TABLET), const Breakpoint(start: 801, end: double.infinity, name: DESKTOP), ], ), home: MyHomePage(), ) ``` -------------------------------- ### ResponsiveValue Usage Example Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_value.md Demonstrates how to define responsive margins using specific breakpoint conditions. ```dart final responsiveMargin = ResponsiveValue( context, conditionalValues: [ Condition.equals(name: MOBILE, value: 8.0), Condition.equals(name: TABLET, value: 16.0), Condition.equals(name: DESKTOP, value: 24.0), ], defaultValue: 8.0, ).value; // Use responsiveMargin in your widget Padding(padding: EdgeInsets.all(responsiveMargin), child: child) ``` -------------------------------- ### Breakpoint Configuration Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/configuration.md Defines responsive behavior ranges using start and end widths. ```APIDOC ## Breakpoint ### Description Defines a responsive width range. ### Parameters - **start** (double) - Required - Starting width in logical pixels - **end** (double) - Required - Ending width in logical pixels - **name** (String?) - Optional - Label for the breakpoint - **data** (dynamic) - Optional - Metadata associated with the breakpoint ``` -------------------------------- ### ResponsiveVisibility Usage Examples Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_value.md Common patterns for showing, hiding, or swapping widgets based on responsive conditions. ```dart // Show widget only on mobile ResponsiveVisibility( visibleConditions: [ Condition.equals(name: MOBILE), ], child: MobileOnlyWidget(), ) // Hide widget on desktop ResponsiveVisibility( hiddenConditions: [ Condition.equals(name: DESKTOP), ], child: ResponsiveWidget(), replacement: SizedBox.shrink(), ) // Show different content based on screen size ResponsiveVisibility( visibleConditions: [ Condition.largerThan(name: MOBILE), ], replacement: CompactAppBar(), child: FullWidthAppBar(), ) ``` -------------------------------- ### ClampingScrollWrapper Usage Examples Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/scroll_behavior.md Demonstrates direct implementation and usage within a MaterialApp builder. ```dart // Direct usage ClampingScrollWrapper( child: ListView(children: items), ) // With MaterialApp MaterialApp( builder: (context, child) => ClampingScrollWrapper( dragWithMouse: false, child: child!, ), ) ``` -------------------------------- ### Switch on responsiveTargetPlatform Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_utils.md Example of using a switch statement to handle different platforms returned by the extension. ```dart final theme = Theme.of(context); final responsive = theme.platform.responsiveTargetPlatform; switch (responsive) { case ResponsiveTargetPlatform.web: // Web specific code break; case ResponsiveTargetPlatform.android: // Android specific code break; case ResponsiveTargetPlatform.iOS: // iOS specific code break; default: // Other platforms } ``` -------------------------------- ### Condition Example Source: https://github.com/codelessly/responsiveframework/blob/master/migration_0.2.0_to_1.0.0.md Example of a specific condition used within ResponsiveValue. ```dart Condition.equals(name: MOBILE, value: 450), ``` -------------------------------- ### Configure Web App with Mouse Support Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/scroll_behavior.md Example of wrapping a MaterialApp with scroll behaviors to enable mouse dragging and hide scrollbars. ```dart MaterialApp( builder: (context, child) => BouncingScrollWrapper( dragWithMouse: true, child: NoScrollbarWrapper( child: child!, ), ), home: HomePage(), ) ``` -------------------------------- ### Initialize ResponsiveBreakpoints Source: https://github.com/codelessly/responsiveframework/blob/master/migration_0.2.0_to_1.0.0.md Use the builder to define application-wide breakpoints with explicit start and end ranges. ```dart ResponsiveBreakpoints.builder( child: child!, breakpoints: [ const Breakpoint(start: 0, end: 450, name: MOBILE), const Breakpoint(start: 451, end: 800, name: TABLET), const Breakpoint(start: 801, end: 1920, name: DESKTOP), const Breakpoint(start: 1921, end: double.infinity, name: '4K'), ], ) ``` -------------------------------- ### Configure Standard Breakpoints Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/configuration.md A common setup for defining responsive ranges across mobile, tablet, and desktop. ```dart const breakpoints = [ Breakpoint( start: 0, end: 450, name: MOBILE, ), Breakpoint( start: 451, end: 800, name: TABLET, ), Breakpoint( start: 801, end: 1920, name: DESKTOP, ), Breakpoint( start: 1921, end: double.infinity, name: '4K', ), ]; ``` -------------------------------- ### Configure Item Flex for Row and Column Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_row_column.md Example showing how to set different flex and fit values for row versus column orientations. ```dart ResponsiveRowColumnItem( rowFlex: 1, // Takes 1/3 width in ROW columnFlex: 2, // Takes 2 parts in COLUMN rowFit: FlexFit.tight, columnFit: FlexFit.loose, child: Widget(), ) ``` -------------------------------- ### Sorting Breakpoints Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_utils.md Example of using breakpointComparator to sort a list of breakpoints by their start values. ```dart List breakpoints = [ Breakpoint(start: 800, end: 1200, name: 'DESKTOP'), Breakpoint(start: 0, end: 450, name: 'MOBILE'), Breakpoint(start: 451, end: 800, name: 'TABLET'), ]; breakpoints.sort(ResponsiveUtils.breakpointComparator); // Result: MOBILE (0-450), TABLET (451-800), DESKTOP (800-1200) ``` -------------------------------- ### Usage Examples for NoScrollbarWrapper Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/scroll_behavior.md Demonstrates direct usage, integration with MaterialApp, and application to specific scrollable widgets. ```dart // Direct usage NoScrollbarWrapper( child: ListView(children: items), ) // With MaterialApp MaterialApp( builder: (context, child) => NoScrollbarWrapper( child: child!, ), ) // Hide scrollbars on specific widgets NoScrollbarWrapper( child: SingleChildScrollView( child: LongContent(), ), ) ``` -------------------------------- ### Define Tags Source: https://github.com/codelessly/responsiveframework/blob/master/migration_0.2.0_to_1.0.0.md Create a tag by setting the start and end breakpoints to the same value. ```dart const ResponsiveBreakpoint.tag(900, name: 'EXPAND_SIDE_PANEL') ``` ```dart const Breakpoint(start: 900, end: 900, name: 'EXPAND_SIDE_PANEL') ``` -------------------------------- ### Get responsiveTargetPlatform property Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_utils.md Getter signature for converting TargetPlatform to ResponsiveTargetPlatform. ```dart ResponsiveTargetPlatform get responsiveTargetPlatform ``` -------------------------------- ### Condition.between Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_value.md Creates a condition that matches when the screen width is within the inclusive range of start and end. ```APIDOC ## Condition.between(start, end, value, landscapeValue) ### Description Condition that matches when screen width is between start and end (inclusive). ### Parameters - **start** (int) - Required - Minimum screen width - **end** (int) - Required - Maximum screen width - **value** (T?) - Optional - Value when condition is active - **landscapeValue** (T?) - Optional - Landscape override value ### Example Condition.between(start: 450, end: 800, value: 12.0) ``` -------------------------------- ### Breakpoint Usage Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/types.md Example of defining Breakpoint objects with specific pixel ranges and associated names. ```dart const Breakpoint(start: 0, end: 450, name: MOBILE), const Breakpoint(start: 451, end: 800, name: TABLET), const Breakpoint(start: 801, end: double.infinity, name: DESKTOP), ``` -------------------------------- ### BouncingScrollWrapper Usage Examples Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/scroll_behavior.md Common implementation patterns for BouncingScrollWrapper including direct usage and MaterialApp integration. ```dart // Direct usage BouncingScrollWrapper( child: ListView(children: items), ) // With MaterialApp MaterialApp( builder: (context, child) => BouncingScrollWrapper( dragWithMouse: true, child: child!, ), ) // Enable mouse dragging BouncingScrollWrapper( dragWithMouse: true, child: SingleChildScrollView(child: content), ) ``` -------------------------------- ### Get Scroll Physics Method Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/scroll_behavior.md Method signature for retrieving bouncing scroll physics. ```dart ScrollPhysics getScrollPhysics(BuildContext context) ``` -------------------------------- ### Apply ResponsiveConstraints to a widget Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_value.md Example of using conditional constraints to adjust max dimensions based on device type. ```dart ResponsiveConstraints( conditionalConstraints: [ Condition.equals( name: MOBILE, value: BoxConstraints( maxWidth: 300, maxHeight: 400, ), ), Condition.equals( name: DESKTOP, value: BoxConstraints( maxWidth: 800, maxHeight: 600, ), ), ], child: MyWidget(), ) ``` -------------------------------- ### Set ResponsiveGridDelegate Extent Types Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/configuration.md Examples of choosing between fixed, maximum, or minimum extent types for grid items. ```dart // ✓ Fixed size items ResponsiveGridDelegate( crossAxisExtent: 200, // Each item is exactly 200dp wide ) // ✓ Maximum size (expands if space available) ResponsiveGridDelegate( maxCrossAxisExtent: 200, // Items grow to fill width, max 200dp ) // ✓ Minimum size (shrinks if space limited) ResponsiveGridDelegate( minCrossAxisExtent: 100, // Items shrink to fit, min 100dp ) ``` -------------------------------- ### Define Breakpoints Source: https://github.com/codelessly/responsiveframework/blob/master/migration_0.2.0_to_1.0.0.md Compare the old resize breakpoint syntax with the new explicit start and end range syntax. ```dart const ResponsiveBreakpoint.resize(450, name: MOBILE) ``` ```dart const Breakpoint(start: 0, end: 450, name: MOBILE) ``` -------------------------------- ### Initialize ResponsiveBreakpoints and ResponsiveGridView Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/00_START_HERE.md Configures the application with responsive breakpoints and demonstrates a responsive grid layout that adjusts based on screen size. ```dart import 'package:responsive_framework/responsive_framework.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return MaterialApp( builder: (context, child) => ResponsiveBreakpoints.builder( child: child!, breakpoints: [ const Breakpoint(start: 0, end: 450, name: MOBILE), const Breakpoint(start: 451, end: 800, name: TABLET), const Breakpoint(start: 801, end: double.infinity, name: DESKTOP), ], ), home: const MyHomePage(), ); } } class MyHomePage extends StatelessWidget { const MyHomePage({Key? key}) : super(key: key); @override Widget build(BuildContext context) { final responsive = ResponsiveBreakpoints.of(context); return Scaffold( appBar: AppBar(title: const Text('Responsive App')), body: MaxWidthBox( maxWidth: responsive.isDesktop ? 1200 : 600, child: ResponsiveGridView( gridDelegate: ResponsiveGridDelegate( maxCrossAxisExtent: 200, mainAxisSpacing: 8, crossAxisSpacing: 8, ), children: List.generate( 20, (i) => Card(child: Center(child: Text('Item $i'))), ), ), ), ); } } ``` -------------------------------- ### Define a Breakpoint Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/00_START_HERE.md Defines a responsive range with a start, end, and name identifier. ```dart const Breakpoint(start: 0, end: 450, name: MOBILE) ``` -------------------------------- ### Use Responsive Widgets Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/README.md Implement responsive UI components for visibility control, grid layouts, and width constraints. ```dart // Responsive visibility ResponsiveVisibility( visibleConditions: [Condition.largerThan(name: MOBILE)], child: DesktopMenu(), ) // Responsive grid ResponsiveGridView( gridDelegate: ResponsiveGridDelegate( maxCrossAxisExtent: 200, ), children: items, ) // Max width constraint MaxWidthBox( maxWidth: 800, child: MyContent(), ) ``` -------------------------------- ### Display Project File Structure Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/MANIFEST.md Visual representation of the documentation directory structure. ```text output/ ├── README.md # Main overview and quick start ├── MANIFEST.md # This file ├── types.md # Type definitions and structures ├── configuration.md # Setup and configuration guide ├── errors.md # Error conditions and handling └── api-reference/ ├── INDEX.md # Quick reference and index ├── breakpoint.md # Breakpoint class ├── responsive_breakpoints.md # Core ResponsiveBreakpoints widget ├── responsive_value.md # ResponsiveValue, Condition, Visibility ├── responsive_row_column.md # Responsive row/column layout ├── responsive_grid.md # Responsive grid layout ├── responsive_scaled_box.md # Scaling widget ├── max_width_box.md # Max width constraint widget ├── responsive_utils.md # Utilities and enums └── scroll_behavior.md # Scroll behavior classes ``` -------------------------------- ### Import Responsive Framework Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/README.md The primary import statement to access all public classes and constants. ```dart import 'package:responsive_framework/responsive_framework.dart'; ``` -------------------------------- ### Implement Responsive Logic Source: https://github.com/codelessly/responsiveframework/blob/master/README.md Use breakpoint labels to conditionally render widgets or check screen size status. ```dart // Example: if the screen is bigger than the Mobile breakpoint, build full width AppBar icons and labels. if (ResponsiveBreakpoints.of(context).largerThan(MOBILE)) FullWidthAppBarItems() // Booleans ResponsiveBreakpoints.of(context).isDesktop; ResponsiveBreakpoints.of(context).isTablet; ResponsiveBreakpoints.of(context).isMobile; ResponsiveBreakpoints.of(context).isPhone; // Conditionals ResponsiveBreakpoints.of(context).equals(DESKTOP) ResponsiveBreakpoints.of(context).largerThan(MOBILE) ResponsiveBreakpoints.of(context).smallerThan(TABLET) ResponsiveBreakpoints.of(context).between(MOBILE, TABLET) ... ``` -------------------------------- ### ResponsiveGridView() Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_grid.md Constructor for creating a ResponsiveGridView with a fixed list of children. ```APIDOC ## ResponsiveGridView() ### Description Constructor for using a fixed list of children in a responsive grid. ### Parameters - **scrollDirection** (Axis) - Default: vertical - Axis along which scroll view scrolls - **reverse** (bool) - Default: false - Reverse scroll direction - **controller** (ScrollController?) - Default: null - Scroll controller - **primary** (bool?) - Default: null - Use as primary scroll view - **physics** (ScrollPhysics?) - Default: null - Scroll physics - **shrinkWrap** (bool) - Default: false - Wrap content and avoid infinite height - **padding** (EdgeInsetsGeometry?) - Default: null - Padding around grid - **alignment** (AlignmentGeometry) - Default: centerLeft - Align grid items together - **gridDelegate** (ResponsiveGridDelegate) - Required - Grid layout configuration - **children** (List?) - Default: [] - List of grid items - **maxRowCount** (int?) - Default: null - Limit number of rows - **addAutomaticKeepAlives** (bool) - Default: true - Add automatic keep alives - **addRepaintBoundaries** (bool) - Default: true - Add repaint boundaries - **addSemanticIndexes** (bool) - Default: true - Add semantic indexes - **cacheExtent** (double?) - Default: null - Cache extent for rendering - **semanticChildCount** (int?) - Default: null - Semantic child count - **dragStartBehavior** (DragStartBehavior) - Default: start - Drag start behavior - **keyboardDismissBehavior** (ScrollViewKeyboardDismissBehavior) - Default: manual - Keyboard dismiss behavior - **clipBehavior** (Clip) - Default: hardEdge - Clip behavior - **restorationId** (String?) - Default: null - Restoration identifier ``` -------------------------------- ### ResponsiveBreakpoints Constructor Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/configuration.md The primary configuration point for the framework, initialized via constructor parameters. ```APIDOC ## ResponsiveBreakpoints Constructor ### Description Initializes the responsive framework for a widget tree. ### Parameters - **child** (Widget) - Required - Child widget tree to make responsive - **breakpoints** (List) - Required - Portrait/default breakpoints defining responsive ranges - **breakpointsLandscape** (List?) - Optional - Landscape-specific breakpoints - **landscapePlatforms** (List?) - Optional - Platforms where landscape breakpoints apply - **useShortestSide** (bool) - Optional - Use shortest dimension for calculations instead of width (default: false) - **debugLog** (bool) - Optional - Print breakpoint visualization to console (default: false) ``` -------------------------------- ### Use ResponsiveTargetPlatform for conditional logic Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_utils.md Demonstrates checking the current platform using the responsiveTargetPlatform extension property. ```dart final platform = Theme.of(context).platform.responsiveTargetPlatform; if (platform == ResponsiveTargetPlatform.web) { // Web-specific behavior } else if (platform == ResponsiveTargetPlatform.android) { // Android-specific behavior } ``` -------------------------------- ### Migrate ResponsiveWrapper to ResponsiveBreakpoints and ResponsiveScaledBox Source: https://github.com/codelessly/responsiveframework/blob/master/migration_0.2.0_to_1.0.0.md Demonstrates the transition from the legacy ResponsiveWrapper builder to the new modular approach using ResponsiveBreakpoints for layout and ResponsiveScaledBox for scaling. ```dart MaterialApp( builder: (context, child) => ResponsiveWrapper.builder( BouncingScrollWrapper.builder(context, child!), maxWidth: 1200, minWidth: 450, defaultScale: true, breakpoints: [ const ResponsiveBreakpoint.resize(450, name: MOBILE), const ResponsiveBreakpoint.autoScale(800, name: TABLET), const ResponsiveBreakpoint.resize(1920, name: DESKTOP), const ResponsiveBreakpoint.autoScale(2460, name: "4K"), ], background: Container(color: const Color(0xFFF5F5F5))), ); ``` ```dart MaterialApp( builder: (context, child) => ResponsiveBreakpoints.builder( child: child!, breakpoints: [ const Breakpoint(start: 0, end: 450, name: MOBILE), const Breakpoint(start: 451, end: 800, name: TABLET), const Breakpoint(start: 801, end: 1920, name: DESKTOP), const Breakpoint(start: 1921, end: double.infinity, name: '4K'), ], ), onGenerateRoute: (RouteSettings settings) { return MaterialPageRoute(builder: (context) { // The following code implements the legacy ResponsiveWrapper AutoScale functionality // using the new ResponsiveScaledBox. The ResponsiveScaledBox widget preserves // the legacy ResponsiveWrapper behavior, scaling the UI instead of resizing. // // **MaxWidthBox** - A widget that limits the maximum width. // This is used to create a gutter area on either side of the content. // // **ResponsiveScaledBox** - A widget that renders its child // with a FittedBox set to the `width` value. Set the fixed width value // based on the active breakpoint. return MaxWidthBox( maxWidth: 1200, background: Container(color: const Color(0xFFF5F5F5)), child: ResponsiveScaledBox( width: ResponsiveValue(context, conditionalValues: [ Condition.equals(name: MOBILE, value: 450), Condition.between(start: 800, end: 1100, value: 800), Condition.between(start: 1000, end: 1200, value: 1000), // There are no conditions for width over 1200 // because the `maxWidth` is set to 1200 via the MaxWidthBox. ]).value, child: BouncingScrollWrapper.builder( context, buildPage(settings.name ?? ''), dragWithMouse: true), ), ); }); }, ); ``` -------------------------------- ### Configure Responsive Breakpoints Source: https://github.com/codelessly/responsiveframework/blob/master/README.md Defines responsive behavior for different screen sizes using a list of breakpoints. ```dart ResponsiveWrapper( child, breakpoints: [ ResponsiveBreakpoint.resize(600, name: MOBILE), ResponsiveBreakpoint.autoScale(800, name: TABLET), ResponsiveBreakpoint.autoScale(1200, name: DESKTOP), ], ) ``` -------------------------------- ### Implement a Responsive Header Layout Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_row_column.md Configures a header that switches between row and column orientations with specific alignment and spacing properties. ```dart ResponsiveRowColumn( layout: ResponsiveRowColumnType.ROW, rowMainAxisAlignment: MainAxisAlignment.spaceBetween, rowCrossAxisAlignment: CrossAxisAlignment.center, rowSpacing: 16.0, columnMainAxisAlignment: MainAxisAlignment.start, columnCrossAxisAlignment: CrossAxisAlignment.stretch, columnSpacing: 12.0, children: [ ResponsiveRowColumnItem( rowFlex: 1, child: Logo(), ), ResponsiveRowColumnItem( rowFlex: 2, columnOrder: 2, child: NavigationMenu(), ), ResponsiveRowColumnItem( rowFlex: 1, columnOrder: 1, child: UserProfile(), ), ], ) ``` -------------------------------- ### ResponsiveUtils.breakpointComparator Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_utils.md A comparator function used to sort a list of Breakpoint objects from smallest to largest based on their start values. ```APIDOC ## static int breakpointComparator(Breakpoint a, Breakpoint b) ### Description Comparator function to sort breakpoints from small to large by start value. ### Parameters - **a** (Breakpoint) - Required - First breakpoint to compare - **b** (Breakpoint) - Required - Second breakpoint to compare ### Returns - Negative if a < b - Zero if a == b - Positive if a > b ``` -------------------------------- ### ResponsiveGridDelegate Methods Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_grid.md Internal methods for layout calculation and change detection. ```dart SliverGridLayout getLayout(SliverConstraints constraints) ``` ```dart bool shouldRelayout(ResponsiveGridDelegate oldDelegate) ``` -------------------------------- ### ResponsiveVisibility Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/INDEX.md Show or hide widgets based on screen size conditions. ```APIDOC ## ResponsiveVisibility ### Description Show or hide widgets based on screen size conditions. ### Constructor - `ResponsiveVisibility()` — Create with visible/hidden conditions ### Properties - `child` — Widget to show/hide - `visibleConditions` — Conditions that show widget - `hiddenConditions` — Conditions that hide widget - `visible` — Default visibility state - `replacement` — Widget to show when hidden - `maintainState` / `maintainAnimation` / `maintainSize` — Visibility options ``` -------------------------------- ### ResponsiveGridDelegate Constructor Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_grid.md Constructor signature for the delegate. Exactly one of the extent parameters must be provided. ```dart const ResponsiveGridDelegate({ double? crossAxisExtent, double? maxCrossAxisExtent, double? minCrossAxisExtent, double mainAxisSpacing = 0, double crossAxisSpacing = 0, double childAspectRatio = 1, }) ``` -------------------------------- ### Debug Breakpoints at Startup Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_utils.md Log breakpoint configurations to the console for debugging purposes during development. ```dart void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { final breakpoints = [ const Breakpoint(start: 0, end: 450, name: MOBILE), const Breakpoint(start: 451, end: 800, name: TABLET), const Breakpoint(start: 801, end: double.infinity, name: DESKTOP), ]; // Print breakpoint visualization for debugging ResponsiveUtils.debugLogBreakpoints(breakpoints); return MaterialApp( builder: (context, child) => ResponsiveBreakpoints.builder( child: child!, breakpoints: breakpoints, debugLog: true, // Also logs during runtime ), ); } } ``` -------------------------------- ### Configure ResponsiveGridDelegate Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/configuration.md Defines the constructor parameters for the ResponsiveGridDelegate widget. ```dart const ResponsiveGridDelegate({ double? crossAxisExtent, // Fixed item width double? maxCrossAxisExtent, // Maximum item width double? minCrossAxisExtent, // Minimum item width double mainAxisSpacing = 0, // Vertical gap between items double crossAxisSpacing = 0, // Horizontal gap between items double childAspectRatio = 1, // Width-to-height ratio }) ``` -------------------------------- ### Implement Platform-Specific Widgets Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_utils.md Switch between different app wrappers or configurations based on the detected responsive target platform. ```dart Widget buildPlatformSpecificWidget(BuildContext context) { final platform = Theme.of(context).platform.responsiveTargetPlatform; switch (platform) { case ResponsiveTargetPlatform.iOS: return CupertinoApp(home: MyApp()); case ResponsiveTargetPlatform.android: return MaterialApp(home: MyApp()); case ResponsiveTargetPlatform.web: return MaterialApp( home: MyApp(), scrollBehavior: ClampingScrollWrapper.builder, ); default: return MaterialApp(home: MyApp()); } } ``` -------------------------------- ### Select widgets based on visibility conditions Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_value.md Use ResponsiveVisibility to swap widgets based on screen size constraints. ```dart ResponsiveVisibility( visible: false, visibleConditions: [ Condition.largerThan(name: MOBILE), ], replacement: CompactNavigationDrawer(), child: FullNavigationRail(), ) ``` -------------------------------- ### ResponsiveGridView Constructor Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_grid.md Constructor for initializing a ResponsiveGridView with a fixed list of children. ```dart const ResponsiveGridView({ this.scrollDirection = Axis.vertical, this.reverse = false, this.controller, this.primary, this.physics, this.shrinkWrap = false, this.padding, this.alignment = Alignment.centerLeft, required this.gridDelegate, this.children = const [], this.maxRowCount, this.addAutomaticKeepAlives = true, this.addRepaintBoundaries = true, this.addSemanticIndexes = true, this.cacheExtent, this.semanticChildCount, this.dragStartBehavior = DragStartBehavior.start, this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual, this.clipBehavior = Clip.hardEdge, this.restorationId, }) ``` -------------------------------- ### ResponsiveBreakpoints Constructor Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_breakpoints.md Initializes the ResponsiveBreakpoints widget to track screen dimensions and provide responsive layout data to child widgets. ```APIDOC ## ResponsiveBreakpoints() ### Description A stateful widget that tracks screen dimensions and determines the active breakpoint to enable responsive UI adaptation. ### Constructor ResponsiveBreakpoints({required Widget child, required List breakpoints, List? breakpointsLandscape, List? landscapePlatforms, bool useShortestSide = false, bool debugLog = false}) ### Parameters - **child** (Widget) - Required - The child widget tree. - **breakpoints** (List) - Required - Portrait mode breakpoints. - **breakpointsLandscape** (List?) - Optional - Landscape mode breakpoints. - **landscapePlatforms** (List?) - Optional - Platforms where landscape breakpoints apply. - **useShortestSide** (bool) - Optional - Calculate responsiveness using shortest side instead of width (default: false). - **debugLog** (bool) - Optional - Print breakpoint visualization to console (default: false). ``` -------------------------------- ### ResponsiveValue Constructor Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_value.md Initializes a new ResponsiveValue instance to determine a value based on the current screen context and defined conditions. ```APIDOC ## ResponsiveValue(BuildContext context, {required List> conditionalValues, T? defaultValue}) ### Description Creates a ResponsiveValue object that evaluates the provided conditionalValues against the current screen context to return an appropriate value. ### Parameters - **context** (BuildContext) - Required - Build context for accessing ResponsiveBreakpoints. - **conditionalValues** (List>) - Required - List of conditions and their associated values. - **defaultValue** (T?) - Optional - Fallback value returned when no condition matches. ### Throws - **FlutterError** - Thrown if a named breakpoint reference is used but no parent ResponsiveBreakpoints exists. ``` -------------------------------- ### ResponsiveVisibility Constructor Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_value.md The constructor signature for initializing ResponsiveVisibility. ```dart const ResponsiveVisibility({ required Widget child, bool visible = true, List> visibleConditions = const [], List> hiddenConditions = const [], Widget replacement = const SizedBox.shrink(), bool maintainState = false, bool maintainAnimation = false, bool maintainSize = false, bool maintainSemantics = false, bool maintainInteractivity = false, }) ``` -------------------------------- ### Create Responsive Grid Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/README.md Displays a grid layout that adapts to screen size using ResponsiveGridView. ```dart ResponsiveGridView( gridDelegate: ResponsiveGridDelegate( maxCrossAxisExtent: 200, mainAxisSpacing: 12, crossAxisSpacing: 12, ), children: items, ) ``` -------------------------------- ### Implement Responsive Padding Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/README.md Dynamically sets padding values based on the device breakpoint. ```dart Padding( padding: EdgeInsets.all( ResponsiveValue( context, conditionalValues: [ Condition.equals(name: MOBILE, value: 8.0), Condition.equals(name: TABLET, value: 16.0), Condition.equals(name: DESKTOP, value: 24.0), ], ).value, ), child: child, ) ``` -------------------------------- ### Configure ResponsiveGridDelegate correctly Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/errors.md Ensure only one extent type is provided and spacing values are non-negative to avoid assertion errors. ```dart // ✓ Correct - specify one extent type ResponsiveGridView( gridDelegate: ResponsiveGridDelegate( maxCrossAxisExtent: 200, // Maximum item width mainAxisSpacing: 8.0, crossAxisSpacing: 8.0, ), ) // ✓ Correct - fixed item width ResponsiveGridView( gridDelegate: ResponsiveGridDelegate( crossAxisExtent: 150, // Fixed item width mainAxisSpacing: 8.0, crossAxisSpacing: 8.0, ), ) // ❌ Wrong - provides multiple extent types ResponsiveGridView( gridDelegate: ResponsiveGridDelegate( crossAxisExtent: 150, maxCrossAxisExtent: 200, // Error: only one allowed ), ) // ❌ Wrong - negative spacing ResponsiveGridView( gridDelegate: ResponsiveGridDelegate( maxCrossAxisExtent: 200, mainAxisSpacing: -8.0, // Error: must be >= 0 ), ) ``` -------------------------------- ### Breakpoint Constructor Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/breakpoint.md Creates a new Breakpoint instance to define a responsive range. ```APIDOC ## Breakpoint(start, end, name, data) ### Description Initializes a new Breakpoint instance with a defined width range. ### Parameters - **start** (double) - Required - Starting screen width in logical pixels. - **end** (double) - Required - Ending screen width in logical pixels (use double.infinity for unbounded). - **name** (String?) - Optional - Optional label for this breakpoint. - **data** (dynamic) - Optional - Optional metadata attached to this breakpoint. ``` -------------------------------- ### Configure ResponsiveGridView Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/configuration.md Defines the constructor parameters for the ResponsiveGridView widget. ```dart const ResponsiveGridView({ required ResponsiveGridDelegate gridDelegate, List children, int? maxRowCount, // Limit number of rows displayed AlignmentGeometry alignment = Alignment.centerLeft, bool shrinkWrap = false, EdgeInsetsGeometry? padding, // ... other ScrollView parameters }) ``` -------------------------------- ### Initialize ResponsiveBreakpoints with builder Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_breakpoints.md Use this factory method within the builder parameter of MaterialApp or CupertinoApp to define responsive breakpoints. ```dart static Widget builder({ required Widget child, required List breakpoints, List? breakpointsLandscape, List? landscapePlatforms, bool useShortestSide = false, bool debugLog = false, }) ``` ```dart MaterialApp( builder: (context, child) => ResponsiveBreakpoints.builder( child: child!, breakpoints: [ const Breakpoint(start: 0, end: 450, name: MOBILE), const Breakpoint(start: 451, end: 800, name: TABLET), const Breakpoint(start: 801, end: double.infinity, name: DESKTOP), ], ), ) ``` -------------------------------- ### ResponsiveValue Constructor Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_value.md Constructor signature for initializing a ResponsiveValue instance. ```dart ResponsiveValue( BuildContext context, { required List> conditionalValues, T? defaultValue, }) ``` -------------------------------- ### ResponsiveGridView.builder() Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_grid.md Constructor for creating a ResponsiveGridView using a builder function for lazy loading items. ```APIDOC ## ResponsiveGridView.builder() ### Description Constructor for using a builder function for lazy loading grid items. ### Parameters - **itemBuilder** (IndexedWidgetBuilder) - Required - Builder function for creating items - **itemCount** (int?) - Default: null - Total number of items - **maxRowCount** (int?) - Default: null - Limit number of rows - **gridDelegate** (ResponsiveGridDelegate) - Required - Grid layout configuration ``` -------------------------------- ### ResponsiveGridDelegate Constructor Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_grid.md The constructor for configuring the grid layout behavior. You must provide exactly one of crossAxisExtent, maxCrossAxisExtent, or minCrossAxisExtent. ```APIDOC ## ResponsiveGridDelegate() ### Description Creates a delegate that controls the layout of a ResponsiveGridView. It determines how items are sized and spaced within the grid. ### Parameters - **crossAxisExtent** (double?) - Optional - Fixed width for each grid item. - **maxCrossAxisExtent** (double?) - Optional - Maximum width for each grid item (grid expands to fill). - **minCrossAxisExtent** (double?) - Optional - Minimum width for each grid item (shrinks to fit). - **mainAxisSpacing** (double) - Optional - Vertical spacing between items (default: 0). - **crossAxisSpacing** (double) - Optional - Horizontal spacing between items (default: 0). - **childAspectRatio** (double) - Optional - Width-to-height ratio for items (default: 1). ``` -------------------------------- ### Implement responsive application scaling Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_scaled_box.md Dynamically sets the target width based on current device breakpoints using ResponsiveBreakpoints. ```dart Widget build(BuildContext context) { double? targetWidth; final responsive = ResponsiveBreakpoints.of(context); if (responsive.isMobile) { targetWidth = null; // Don't scale on mobile } else if (responsive.isTablet) { targetWidth = 500; } else { targetWidth = 800; // Scale desktop to fixed width } return ResponsiveScaledBox( width: targetWidth, child: MyApp(), ); } ``` -------------------------------- ### ResponsiveRowColumnItem Constructor Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_row_column.md Constructor signature for initializing a ResponsiveRowColumnItem with specific layout constraints. ```dart const ResponsiveRowColumnItem({ required Widget child, int rowOrder = 1073741823, int columnOrder = 1073741823, bool rowColumn = true, int? rowFlex, int? columnFlex, FlexFit? rowFit, FlexFit? columnFit, }) ``` -------------------------------- ### ResponsiveGridView Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/INDEX.md A responsive GridView implementation that supports flexible item sizing and grid delegates. ```APIDOC ## ResponsiveGridView ### Description A grid layout widget that supports responsive item sizing via a delegate. ### Constructors - `ResponsiveGridView()` - Create with fixed children list - `ResponsiveGridView.builder()` - Create with builder function ### Properties - `gridDelegate` (ResponsiveGridDelegate) - Sizing configuration - `children` / `itemBuilder` / `itemCount` - Grid items configuration - `maxRowCount` (int) - Limit number of rows displayed - `alignment` (AlignmentGeometry) - Align grid items in space - `padding` (EdgeInsets) - Padding around grid - `scrollDirection` (Axis) - Scroll axis ``` -------------------------------- ### Create Website Container Layout Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/max_width_box.md Uses MaxWidthBox to wrap a scrollable column, common for standard website container layouts. ```dart MaxWidthBox( maxWidth: 1000, alignment: Alignment.topCenter, padding: EdgeInsets.symmetric(horizontal: 20), backgroundColor: Colors.white, child: SingleChildScrollView( child: Column( children: [ WebHeader(), WebContent(), WebFooter(), ], ), ), ) ``` -------------------------------- ### Enable Debug Logging Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/configuration.md Visualize breakpoint ranges in the console to verify configuration. ```dart ResponsiveBreakpoints( child: child, breakpoints: breakpoints, debugLog: true, // Prints visualization to console ) ``` -------------------------------- ### Configure Responsive Breakpoints Source: https://github.com/codelessly/responsiveframework/blob/master/README.md Defines responsive behavior using a list of breakpoints with specific resize and autoScale rules. ```dart ResponsiveWrapper( child, maxWidth: 1200, minWidth: 480, defaultScale: true, breakpoints: [ ResponsiveBreakpoint.resize(480, name: MOBILE), ResponsiveBreakpoint.autoScale(800, name: TABLET), ResponsiveBreakpoint.resize(1000, name: DESKTOP), ResponsiveBreakpoint.autoScale(2460, name: '4K'), ], ) ``` -------------------------------- ### ResponsiveGridDelegate Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/configuration.md Configures the layout behavior for a responsive grid, allowing for fixed, maximum, or minimum item widths. ```APIDOC ## ResponsiveGridDelegate ### Constructor `ResponsiveGridDelegate({double? crossAxisExtent, double? maxCrossAxisExtent, double? minCrossAxisExtent, double mainAxisSpacing = 0, double crossAxisSpacing = 0, double childAspectRatio = 1})` ### Parameters - **crossAxisExtent** (double?) - Fixed item width. - **maxCrossAxisExtent** (double?) - Maximum item width. - **minCrossAxisExtent** (double?) - Minimum item width. - **mainAxisSpacing** (double) - Vertical gap between items. - **crossAxisSpacing** (double) - Horizontal gap between items. - **childAspectRatio** (double) - Width-to-height ratio. ``` -------------------------------- ### MaxWidthBox Constructor Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/max_width_box.md The constructor signature for initializing a MaxWidthBox widget. ```dart const MaxWidthBox({ required double? maxWidth, required Widget child, AlignmentGeometry alignment = Alignment.topCenter, EdgeInsets? padding, Color? backgroundColor, }) ``` -------------------------------- ### ResponsiveBreakpoints Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/INDEX.md The root widget used to provide responsive context to the application. It includes methods for initialization and accessing responsive data. ```APIDOC ## ResponsiveBreakpoints ### Description Root widget providing responsive context to the entire application. ### Methods - **ResponsiveBreakpoints()** - Constructor - **builder()** - Factory method for MaterialApp - **of(context)** - Access responsive data from context ### Properties - **breakpoints** - Portrait/default breakpoints - **breakpointsLandscape** - Landscape-specific breakpoints - **useShortestSide** - Use shortest dimension for calculations - **debugLog** - Print breakpoint visualization ``` -------------------------------- ### Verifying context descent Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/errors.md Use a Builder widget to obtain a context that is a descendant of ResponsiveBreakpoints, ensuring safe access to responsive data. ```dart // ❌ Wrong - context is not descended from ResponsiveBreakpoints final data = ResponsiveBreakpoints.of(context); // ✓ Correct - use Builder to get context inside ResponsiveBreakpoints ResponsiveBreakpoints.builder( child: Builder( builder: (context) { final data = ResponsiveBreakpoints.of(context); // Safe return MyWidget(); }, ), breakpoints: [...], ) ``` -------------------------------- ### Create a Responsive Grid with Flex Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_row_column.md Uses rowFlex and columnFlex to distribute space equally among children in both row and column layouts. ```dart ResponsiveRowColumn( layout: ResponsiveRowColumnType.ROW, rowSpacing: 12.0, rowPadding: EdgeInsets.all(8.0), children: [ ResponsiveRowColumnItem( rowFlex: 1, columnFlex: 1, child: GridTile(), ), ResponsiveRowColumnItem( rowFlex: 1, columnFlex: 1, child: GridTile(), ), ResponsiveRowColumnItem( rowFlex: 1, columnFlex: 1, child: GridTile(), ), ], ) ``` -------------------------------- ### ResponsiveRowColumn Constructor Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_row_column.md Constructor for initializing the widget with specific layout parameters and default values. ```dart const ResponsiveRowColumn({ List children = const [], required ResponsiveRowColumnType layout, MainAxisAlignment rowMainAxisAlignment = MainAxisAlignment.start, MainAxisSize rowMainAxisSize = MainAxisSize.max, CrossAxisAlignment rowCrossAxisAlignment = CrossAxisAlignment.center, TextDirection? rowTextDirection, VerticalDirection rowVerticalDirection = VerticalDirection.down, TextBaseline? rowTextBaseline, MainAxisAlignment columnMainAxisAlignment = MainAxisAlignment.start, MainAxisSize columnMainAxisSize = MainAxisSize.max, CrossAxisAlignment columnCrossAxisAlignment = CrossAxisAlignment.center, TextDirection? columnTextDirection, VerticalDirection columnVerticalDirection = VerticalDirection.down, TextBaseline? columnTextBaseline, double? rowSpacing, double? columnSpacing, EdgeInsets rowPadding = EdgeInsets.zero, EdgeInsets columnPadding = EdgeInsets.zero, }) ``` -------------------------------- ### Implement Responsive Max Width Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/max_width_box.md Dynamically adjusts the maxWidth and padding based on the current responsive breakpoint. ```dart Widget build(BuildContext context) { final responsive = ResponsiveBreakpoints.of(context); return MaxWidthBox( maxWidth: responsive.isDesktop ? 1200 : 600, alignment: Alignment.topCenter, padding: EdgeInsets.all(responsive.isDesktop ? 32 : 16), child: Scaffold( body: MyContent(), ), ); } ``` -------------------------------- ### ResponsiveBreakpoints Constructor Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_breakpoints.md The constructor signature for initializing the ResponsiveBreakpoints widget with specific breakpoint lists and configuration flags. ```dart const ResponsiveBreakpoints({ required Widget child, required List breakpoints, List? breakpointsLandscape, List? landscapePlatforms, bool useShortestSide = false, bool debugLog = false, }) ``` -------------------------------- ### ResponsiveScaledBox Constructor Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_scaled_box.md Creates a widget that scales its child to a specified width. ```APIDOC ## ResponsiveScaledBox(width, child, autoCalculateMediaQueryData) ### Description Scales a child widget to fit a specified width while maintaining its aspect ratio and adjusting MediaQueryData. ### Parameters - **width** (double?) - Required - Target width to scale content to (null = no scaling). - **child** (Widget) - Required - Widget to scale. - **autoCalculateMediaQueryData** (bool) - Optional - Automatically adjust MediaQuery for scaled dimensions (default: true). ``` -------------------------------- ### ResponsiveScaledBox Constructor Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_scaled_box.md Constructor signature for initializing a ResponsiveScaledBox instance. ```dart const ResponsiveScaledBox({ required double? width, required Widget child, bool autoCalculateMediaQueryData = true, }) ``` -------------------------------- ### Apply Padding and Background to MaxWidthBox Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/max_width_box.md Configures a constrained box with horizontal and vertical padding and a grey background color. ```dart MaxWidthBox( maxWidth: 800, alignment: Alignment.center, padding: EdgeInsets.symmetric(horizontal: 16, vertical: 24), backgroundColor: Colors.grey[100], child: Card( child: Center( child: Text('Centered constrained content'), ), ), ) ``` -------------------------------- ### Enable Shortest Side Logic Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_breakpoints.md Configure the framework to use the shortest side of the screen for breakpoint calculations. ```dart ResponsiveBreakpoints( child: child, useShortestSide: true, breakpoints: [ const Breakpoint(start: 0, end: 450, name: MOBILE), const Breakpoint(start: 451, end: 800, name: TABLET), const Breakpoint(start: 801, end: double.infinity, name: DESKTOP), ], ) ``` -------------------------------- ### ResponsiveVisibility Constructor Source: https://github.com/codelessly/responsiveframework/blob/master/_autodocs/api-reference/responsive_value.md The ResponsiveVisibility widget constructor allows defining visibility rules using conditions and specifying fallback widgets. ```APIDOC ## ResponsiveVisibility() ### Description A widget that controls the visibility of its child based on responsive conditions. It can show a replacement widget when the visibility condition is not met. ### Parameters - **child** (Widget) - Required - The widget to show or hide. - **visible** (bool) - Optional - Default visibility state (default: true). - **visibleConditions** (List>) - Optional - A list of conditions that trigger the visibility of the child. - **hiddenConditions** (List>) - Optional - A list of conditions that hide the child. - **replacement** (Widget) - Optional - The widget to display when the child is hidden (default: SizedBox.shrink()). - **maintainState** (bool) - Optional - Whether to keep the state when hidden (default: false). - **maintainAnimation** (bool) - Optional - Whether to keep animations when hidden (default: false). - **maintainSize** (bool) - Optional - Whether to preserve the layout size when hidden (default: false). - **maintainSemantics** (bool) - Optional - Whether to keep semantics when hidden (default: false). - **maintainInteractivity** (bool) - Optional - Whether to keep the widget interactive when hidden (default: false). ```