-
Notifications
You must be signed in to change notification settings - Fork 157
Closed
Description
... pub.dev\responsive_framework-1.1.1\lib\responsive_value.dart
=> Throws error when screen exceeds size 600
- my code
@override
Widget build(BuildContext context) {
return AppBar(
title: const Text('HomeView'),
centerTitle: true,
leading: ResponsiveVisibility(
visible: false,
hiddenConditions: [Condition.largerThan(name: TABLET, value: 600)],
child: IconButton(
icon: const Icon(Icons.menu),
onPressed: () {},
),
),
- code classe ResponsiveVisibility
...
bool? visibleValue = visible;
...
@override
Widget build(BuildContext context) {
List<Condition> conditions = [];
bool? visibleValue = visible; //=>🚩 Here he received a boolean
...
In the bottom line it throws an error //🔻
visibleValue = ResponsiveValue(context,
defaultValue: visibleValue, conditionalValues: conditions)
.value;
= > 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.
Metadata
Metadata
Assignees
Labels
No labels