Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
lawrence_shaun_introducing_net_maui_build_and_deploy_crosspl.pdf
Скачиваний:
46
Добавлен:
26.06.2023
Размер:
5.15 Mб
Скачать

Chapter 10 Remote Data

StateContainer fromCommunityToolkit.Maui

You had to build in converters and apply IsVisible bindings to control which view is being displayed when your widget is in a specific state. The StateContainer reduces that overhead so you “just” need to define the states and the views for those states.

If you love to write less code, I recommend checking out the Microsoft documentation at ­https://learn.microsoft.com/dotnet/ communitytoolkit/maui/layouts/statecontainer.

Summary

In this chapter, you

•\

Learned about remote data

•\

Learned how you can interact with it

•\

Covered the common considerations

•\

Looked a concrete example with the Open Weather API

•\

Built your own implementation to consume the Open

 

Weather API

•\

Covered how to consume the data returned

•\

Talked through scenarios where things can go wrong

•\

Provided implementations to handle those scenarios

•\

Looked at how you can reduce the complexity of your

 

implementation with Refit

•\

Added in your Weather Widget

In the next chapter, you will

330