Add static function for an empty header bar
This commit is contained in:
parent
0351e67493
commit
81426e2e0c
@ -29,6 +29,11 @@ Initialize a header bar.
|
||||
- start: The start content.
|
||||
- end: The end content.
|
||||
|
||||
### `empty()`
|
||||
|
||||
Initialize an empty header bar.
|
||||
- Returns: The header bar.
|
||||
|
||||
### `start(start:)`
|
||||
|
||||
Initialize a header bar with only views at the start.
|
||||
|
||||
@ -29,6 +29,12 @@ public struct HeaderBar: Widget {
|
||||
self.end = end()
|
||||
}
|
||||
|
||||
/// Initialize an empty header bar.
|
||||
/// - Returns: The header bar.
|
||||
public static func empty() -> Self {
|
||||
.init(start: { }, end: { })
|
||||
}
|
||||
|
||||
/// Initialize a header bar with only views at the start.
|
||||
/// - Parameter start: The views.
|
||||
/// - Returns: The header bar.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user