You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
struct MyView: View {
// title will be of type: String?
@BlackbirdColumnObserver(\MyModel.$title, primaryKey: 123) var title
var body: some View {
Text(title ?? "Loading…")
}
}
The error I am getting is:
Value of optional type 'String?' must be unwrapped to a value of type 'String'
Weirdly this seems to work by using a !:
struct MyView: View {
// title will be of type: String?
@BlackbirdColumnObserver(\MyModel.$title, primaryKey: 123) var title
var body: some View {
Text((title ?? "Loading…")!)
}
}
I think this happens when the column is an optional already:
@BlackbirdColumn public var title: String?
This results in:
@BlackbirdColumnObserver(\MyModel.$title, primaryKey: 123) var title : String??
This example does not work.
The error I am getting is:
Value of optional type 'String?' must be unwrapped to a value of type 'String'
Weirdly this seems to work by using a !:
I think this happens when the column is an optional already:
This results in:
Related to: 2f15d7f
The text was updated successfully, but these errors were encountered: