FlowBuilder
Stay organized with collections
Save and categorize content based on your preferences.
@resultBuilder
struct FlowBuilder
A result builder that builds a list of nodes for a flow.
-
Transforms the final variadic list of nodes into array.
Declaration
Swift
static func buildBlock(_ nodes: [any Node]...) -> [any Node]
-
Provides support for “if-else” within a FlowBuilder
.
Declaration
Swift
static func buildEither(first: [any Node]?) -> [any Node]
-
Provides support for “if-else” within a FlowBuilder
.
Declaration
Swift
static func buildEither(second: [any Node]?) -> [any Node]
-
Adds support for optionals.
Declaration
Swift
static func buildOptional(_ nodes: [any Node]?) -> [any Node]
-
Declaration
Swift
static func buildArray(_ nodes: [[any Node]]) -> [any Node]
-
Transforms a single node into an array.
Declaration
Swift
static func buildExpression(_ node: any Node) -> [any Node]
-
Transforms an array of nodes.
Declaration
Swift
static func buildExpression(_ nodes: [any Node]) -> [any Node]
-
Transforms a TypedReference
to a node into a node array containing the underlying node.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Incorrect information","incorrectInformation","thumb-down"],["Not enough information/samples","notEnoughInformationSamples","thumb-down"],["Too complicated","tooComplicated","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-09 UTC."],[],[]]