Closed MarceloRab closed 6 months ago
This made it even more elegant
return AppBar(
title: const Text('HomeView'),
centerTitle: true,
leading: Visibility(
visible: !ResponsiveBreakpoints.of(context).largerThan(TABLET),
child: IconButton(
icon: const Icon(Icons.menu),
onPressed: () {},
),
),
Thank you for reporting.
The issue was a Dart language limitation that did not support generic type nullability. With the latest Flutter v3.19, nullable generic types now flow through correctly and the awkwardness can be removed.
We're back to the original API where a constant condition can be passed without forcibly attaching a value!
... pub.dev\responsive_framework-1.1.1\lib\responsive_value.dart
=> Throws error when screen exceeds size 600
...
bool? visibleValue = visible;
......
= > Exception has occurred. _TypeError (type 'int' is not a subtype of type 'bool?')
Suggestion
=>>> No need to "?" in [visibleValue] and this parameter cannot receive an int.