//
//  ChatView.swift
//  forShip
//
//  Created by Mamoru Sugita on 2023/10/16.
//

import SwiftUI

struct ChatView: View {
    @State var isEmargency: Bool = false
    var body: some View {
        ZStack {
            VStack{
                if isEmargency{
                    LinearGradient(gradient: Gradient(colors: [.red,  .black]), startPoint: .top, endPoint: .bottom)
                        .ignoresSafeArea()
                }
            }
            VStack {
                Text("Chat")
                
                Button("Change Emargency"){
                    isEmargency.toggle()
                }
            }
        }
    }
}

#Preview {
    ChatView()
}
