-
-
Save laevandus/3e15c66ccccfd57a0bf00385eb37c87f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct LaneListView: View { | |
@StateObject var viewModel: ViewModel | |
var body: some View { | |
List { | |
ForEach(viewModel.lanes) { lane in | |
LaneRowView(lane: lane) | |
} | |
} | |
.frame(minWidth: 200, minHeight: 200) | |
} | |
final class ViewModel: ObservableObject { | |
let lanes: [Lane] | |
init(document: FastfileDocument) { | |
lanes = document.lanes() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment