Configuration for API endpoints.
dessertMealsURL: String - URL string for fetching dessert meals.mealDetailURL(for id: String) -> String: Function - Generates the URL string for fetching meal details based on meal ID.
Handles network requests.
fetchData<T: Decodable>(from url: URL) async throws -> T: Fetches data from a given URL and decodes it into the specified type.
A mock implementation of NetworkingService for testing purposes.
fetchDataHandler: ((URL) throws -> Data)?: A closure to handle fetching data in tests.
fetchData<T: Decodable>(from url: URL) async throws -> T: Uses thefetchDataHandlerclosure to provide mock data for testing.
Represents the state of a view.
loading: Indicates that the view is loading data.success(T): Indicates that the view successfully loaded data of typeT.failure(String): Indicates that the view failed to load data, with an associated error message.