DHBW-Service-App/DHBW-Service/Views/Tabs/HomeView.swift

32 lines
651 B
Swift
Raw Normal View History

2020-12-21 19:28:01 +00:00
//
// HomeView.swift
// DHBW-Service
//
// Created by Patrick Müller on 21.12.20.
//
import SwiftUI
struct HomeView: View {
2020-12-21 19:54:59 +00:00
@EnvironmentObject var settings: LocalSettings
2020-12-21 19:28:01 +00:00
var body: some View {
2020-12-21 19:54:59 +00:00
VStack {
Button(action: {
self.settings.isFirstOpening = !self.settings.isFirstOpening
}){
Text("First opening toggle")
}
Text("Test")
}
2020-12-21 19:28:01 +00:00
}
}
struct HomeView_Previews: PreviewProvider {
static var previews: some View {
HomeView()
2020-12-21 19:54:59 +00:00
.preferredColorScheme(.dark)
2020-12-21 20:48:26 +00:00
.environmentObject(LocalSettings())
2020-12-21 19:28:01 +00:00
}
}