You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 13, 2023. It is now read-only.
Boolean values are wrongly transformed, resulting always in null as the value for a boolean field.
To Reproduce
subscribe to a table that has a column with a boolean value
change a row in the table
take a look at the resulting (raw) json string containing the new record
compare it with the parsed Map<String, dyanmic> in the SupabaseRealtimePayload and see that all boolean values are now null
Expected behavior
Correct parsing of boolean values.
System information
Flutter 2.5.3
Dart 2.14.4
realtime_client: 0.1.12
Additional context
I did find the cause of this behavior, it lies within the file transformers.dart in the method toBoolean.
There, it only checks for the cases 'f' and 't', however, the previously called .toString() on the value makes the boolean value either 'true' or 'false', which is why the default case is being used, which results in a value of null.
The text was updated successfully, but these errors were encountered:
Great that you reviewed and merged my PR so fast @dshukertjr, thank you. I was wondering however, when we can expect the release of this fixed issue (potentially in version 0.1.13) as I could really use that fix soon. How's your plan there?
Bug report
Describe the bug
Boolean values are wrongly transformed, resulting always in
null
as the value for a boolean field.To Reproduce
Map<String, dyanmic>
in theSupabaseRealtimePayload
and see that all boolean values are nownull
Expected behavior
Correct parsing of boolean values.
System information
Additional context
I did find the cause of this behavior, it lies within the file
transformers.dart
in the methodtoBoolean
.There, it only checks for the cases
'f'
and't'
, however, the previously called.toString()
on the value makes the boolean value either'true'
or'false'
, which is why thedefault
case is being used, which results in a value ofnull
.The text was updated successfully, but these errors were encountered: