A value of type 'String' can't be assigned to a variable of type 'RxString' in flutter Getx

Viewed 1345

I'm trying to convert image to base64 text in Getx controller but it shows error saying "A value of type 'String' can't be assigned to a variable of type 'RxString'".

1 Answers
final RxString rxstring = 'Hello'.obs;

rxstring.value = 'Hi'; // <-- this can change the value of the Rx variable and also trigger its listeners
Related