Lessons implementation

This commit is contained in:
Avery Pace
2021-11-08 12:24:46 -05:00
parent c2d0dfa5e6
commit 3bce439bc4
7 changed files with 142 additions and 30 deletions

View File

@@ -0,0 +1,22 @@
//
// FlashCardLessonsViewModel.swift
// Toki Trainer
//
// Created by Avery Ada Pace on 11/8/21.
//
import Foundation
class FlashCardLessonsViewModel: ObservableObject {
let jsonLoader: TokiJSONLoader = TokiJSONLoader()
@Published var lessons: [TokiLesson] = []
init() {
if let safeLessons = jsonLoader.loadLessons() {
lessons = safeLessons
}
}
}