TokiTrainer/Toki Trainer/ViewModels/FlashCardLessonsViewModel.swift

23 lines
413 B
Swift
Raw Normal View History

2021-11-08 17:24:46 +00:00
//
// 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
}
}
}