---
title: "init(_:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/scenestorage/init(_:)"
---

# init(_:)

Creates a property that can save and restore an Optional boolean.

## Declaration

```swift
init(_ key: String) where Value == Bool?
```

## Parameters

- `key`: A key used to save and restore the value.

## Discussion

Discussion Defaults to nil if there is no restored value

## See Also

### Storing a value

- [init(wrappedValue:_:)](swiftui/scenestorage/init(wrappedvalue:_:).md)
