Today we will throw error from our services and then use Result to communicate the outcome of the operation to the ViewModels. Error will be displayed as an alert to the user. To avoid the quantity or shop items reaching negative values, we will blur the image of items that are sold out.
Chapters:
0:00 Using Result and Blurring Views
0:17 Throwing Errors
0:56 Returning Result
2:35 Creating ErrorViewModel
3:29 Showing Error in Dashboard Scene
5:10 Showing Error in Shop Scene
6:51 Adding a Blur to ShopItem
Source code: https://github.com/codingWithTom/Cast...
Castles - SwiftUI playlist: • Castles - SwiftUI