how do i bind a skiasharp animation based on a string in maui using the ObservableObject class
i'm creating a weather app and i get as a response from the api the status of the current weather. since it's a string i could store it in a public string currentWeather with the [ObservableProperty] annotation. since i have animations stored in my Resources/Raw folder, i'm trying to bind from the xaml code the SKLottieView to the CurrentWeather property that was created by the [ObservableProperty] which is placed in the viewmodel. the problem is, it does take the space in my application through the HeightRequest and WidthRequest, but it's not visible.
as you've noticed, i tried first to hardcode the CurrentWeather property just to check whether it would work before i create a converter class to convert the received status string from the api into the json animation name. i wanted to see if it works. do you have any advice on how i should bind in the xaml code, maybe i'm not doing something right.
0 Replies