ResponsiveFramework icon indicating copy to clipboard operation
ResponsiveFramework copied to clipboard

`the method 'ConditionalRouteWidget' isn't defined`

Open nietsmmar opened this issue 1 year ago • 4 comments

I am using the new version 1.0.0 but there is no ConditionalRouteWidget.

nietsmmar avatar Apr 19 '23 09:04 nietsmmar

i think this working fine with me onGenerateRoute: (RouteSettings settings) { // A custom fadeThrough route transition animation. return Routes.fadeThrough(settings, (context) => MaxWidthBox( // A widget that limits the maximum width. // This is used to create a gutter area on either side of the content. maxWidth: 1200, background: Container(color: const Color(0xFFF5F5F5)), child: ResponsiveScaledBox( // ResponsiveScaledBox renders its child with a FittedBox set to the width value. // Set the fixed width value based on the active breakpoint. width: ResponsiveValue(context, conditionalValues: [ const Condition.equals(name: MOBILE, value: 450), const Condition.between( start: 800, end: 1100, value: 800), const 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)) // child: child!), )); // child: BouncingScrollWrapper.builder( // context, buildPage(settings.name ?? ''), // dragWithMouse: true)); //}); },

aliahmedcs avatar Apr 21 '23 09:04 aliahmedcs

I'm having the same issue. In the responsive_framework.dart I only see these files exported:

library responsive_framework;

export 'breakpoint.dart';
export 'max_width_box.dart';
export 'responsive_breakpoints.dart';
export 'responsive_grid.dart';
export 'responsive_row_column.dart';
export 'responsive_scaled_box.dart';
export 'responsive_value.dart';
export 'utils/scroll_behavior.dart';

The minimal web site sample code is showing that the ConditionalRouteWidget is undefined when you get all the dependencies.

leeparayno avatar Apr 22 '23 16:04 leeparayno

I am using the new version 1.0.0 but there is no ConditionalRouteWidget.

Check here, https://github.com/rayliverified/NavigationUtils/blob/178cd72c934d39e1c6dd703de99e77b22334c455/lib/src/helpers/conditional_route_widget.dart

sailiaspeng avatar Apr 23 '23 06:04 sailiaspeng

Apologies for the confusion. ConditionalRouteWidget is from my other NavigationUtils package.

I'll remove it from the example in the next release to avoid confusion.

Learning moment for me :heart: :book:

rayliverified avatar Apr 26 '23 05:04 rayliverified