private async Task GetCategoryAsync(string categoryID) { if (!IsNewCategory) { await DialogService.DisplayPopupAsync(); Category = await FirebaseService.GetCategoryAsync(categoryID); States = new ObservableCollection <StateModel>(await FirebaseService.GetStatesAsync(categoryID)); await DialogService.PopAsync(); } }
private async Task SetSelectableStatesAsync() { States = new ObservableCollection <StateModel> { new StateModel { StateName = "All", NamedColor = NamedColor.Transparent } }; var states = await FirebaseService.GetStatesAsync(Category.CategoryID); SelectableStates = new ObservableCollection <StateModel>(states); foreach (var state in states) { States.Add(state); } VisibleState = States[0]; }