SwiftUI View: two different initializers: cannot convert value of type 'Text' to closure result type 'Content' – Ios swift
The code: import SwiftUI public struct Snackbar<Content>: View where Content: View { private var content: Content // Works OK public init(@ViewBuilder content: () -> Content) { self.content = content() } init(_ text: String) { self.init { Text(text) // cannot convert…