<div class='sourceset sourceset-android'>Android</div>

```kotlin
public open class RemoteBoolean internal constructor(internal val intValue: RemoteInt) :
    BaseRemoteState<Boolean>()
```

A class representing a remote boolean value.

`RemoteBoolean` internally stores its state as a [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt), typically using `1` for `true` and
`0` for `false`. This allows boolean logic to be evaluated efficiently on the remote rendering
engine.

## Secondary Constructors

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public constructor(
    value: Boolean
) : this(
    if (value) {
        RemoteInt(1)
    } else {
        RemoteInt(0)
    }
)
```

Constructor for creating a [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) instance from a standard `Boolean`.

It converts the standard boolean value into a [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt): `1` for `true` and `0` for `
false`.

#### Parameters

| | |
| --- | --- |
| value | The standard boolean value to convert. |

## Functions

<h2 id="not">not</h2>

```kotlin
public operator fun not(): RemoteBoolean
```

Logical NOT operator for [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean).

This creates a new [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) whose value is the logical inverse of this boolean. It
achieves this by performing a bitwise XOR operation with `1` on the underlying [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt).

#### Returns

| | |
| --- | --- |
|  | A new [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) representing the logical NOT of this boolean. |

<hr class="docs-overload-divider">

<h2 id="toremoteint">toRemoteInt</h2>

```kotlin
public fun toRemoteInt(): RemoteInt
```

Converts this [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) to its underlying [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) representation, which evaluates
to `1` for `true` and `0` for `false`.

#### Returns

| | |
| --- | --- |
|  | The [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) that holds the boolean\'s value. |

<hr class="docs-overload-divider">

<h2 id="select-iftrue-iffalse">select</h2>

```kotlin
public fun select(ifTrue: RemoteString, ifFalse: RemoteString): RemoteString
```

If this RemoteBoolean evaluates to `true` then the returned value evaluates to `ifTrue`
otherwise it evaluates to `ifFalse`.

#### Parameters

| | |
| --- | --- |
| ifTrue | The [RemoteString](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteString) to be selected if this boolean is `true`. |
| ifFalse | The [RemoteString](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteString) to be selected if this boolean is `false`. |

#### Returns

| | |
| --- | --- |
|  | A new [RemoteString](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteString) representing the conditionally selected string. |

<hr class="docs-overload-divider">

<h2 id="select-iftrue-iffalse-2">select</h2>

```kotlin
public fun select(ifTrue: RemoteFloat, ifFalse: RemoteFloat): RemoteFloat
```

If this RemoteBoolean evaluates to `true` then the returned value evaluates to `ifTrue`
otherwise it evaluates to `ifFalse`.

#### Parameters

| | |
| --- | --- |
| ifTrue | The [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) to be selected if this boolean is `true`. |
| ifFalse | The [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) to be selected if this boolean is `false`. |

#### Returns

| | |
| --- | --- |
|  | A new [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat) representing the conditionally selected float value. |

<hr class="docs-overload-divider">

<h2 id="select-iftrue-iffalse-3">select</h2>

```kotlin
public fun select(ifTrue: RemoteInt, ifFalse: RemoteInt): RemoteInt
```

If this RemoteBoolean evaluates to `true` then the returned value evaluates to `ifTrue`
otherwise it evaluates to `ifFalse`.

#### Parameters

| | |
| --- | --- |
| ifTrue | The [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) to be selected if this boolean is `true`. |
| ifFalse | The [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) to be selected if this boolean is `false`. |

#### Returns

| | |
| --- | --- |
|  | A new [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) representing the conditionally selected integer value. |

<hr class="docs-overload-divider">

<h2 id="select-iftrue-iffalse-4">select</h2>

```kotlin
public fun select(ifTrue: RemoteBoolean, ifFalse: RemoteBoolean): RemoteBoolean
```

If this RemoteBoolean evaluates to `true` then the returned value evaluates to `ifTrue`
otherwise it evaluates to `ifFalse`.

#### Parameters

| | |
| --- | --- |
| ifTrue | The [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) to be selected if this boolean is `true`. |
| ifFalse | The [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) to be selected if this boolean is `false`. |

#### Returns

| | |
| --- | --- |
|  | A new [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) representing the conditionally selected integer value. |

<hr class="docs-overload-divider">

<h2 id="select-iftrue-iffalse-5">select</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun select(@ColorInt ifTrue: Int, @ColorInt ifFalse: Int): RemoteColor
```

If this RemoteBoolean evaluates to `true` then the returned value evaluates to `ifTrue`
otherwise it evaluates to `ifFalse`.

#### Parameters

| | |
| --- | --- |
| ifTrue | The color to be selected if this boolean is `true` (as an `Int` representing an ARGB color). |
| ifFalse | The color to be selected if this boolean is `false` (as an `Int` representing an ARGB color). |

#### Returns

| | |
| --- | --- |
|  | A new [RemoteColor](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteColor) representing the conditionally selected color. |

<hr class="docs-overload-divider">

<h2 id="select-iftrue-iffalse-6">select</h2>

```kotlin
public fun select(ifTrue: RemoteColor, ifFalse: RemoteColor): RemoteColor
```

If this RemoteBoolean evaluates to `true` then the returned value evaluates to `ifTrue`
otherwise it evaluates to `ifFalse`.

#### Parameters

| | |
| --- | --- |
| ifTrue | The [RemoteColor](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteColor) to be selected if this boolean is `true`. |
| ifFalse | The [RemoteColor](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteColor) to be selected if this boolean is `false`. |

#### Returns

| | |
| --- | --- |
|  | A new [RemoteColor](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteColor) representing the conditionally selected color. |

<hr class="docs-overload-divider">

<h2 id="eq-b">eq</h2>

```kotlin
public infix fun eq(b: RemoteBoolean): RemoteBoolean
```

Equality operator for [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean)s.

Returns a new [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) that evaluates to `true` if this boolean\'s underlying
[RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) is equal to another [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean)\'s underlying [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt).

#### Parameters

| | |
| --- | --- |
| b | The other [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) to compare with. |

#### Returns

| | |
| --- | --- |
|  | A new [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) representing the result of the equality comparison. |

<hr class="docs-overload-divider">

<h2 id="ne-b">ne</h2>

```kotlin
public infix fun ne(b: RemoteBoolean): RemoteBoolean
```

Inequality operator for [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean)s.

Returns a new [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) that evaluates to `true` if this boolean\'s underlying
[RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) is *not* equal to another [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean)\'s underlying [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt).

#### Parameters

| | |
| --- | --- |
| b | The other [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) to compare with. |

#### Returns

| | |
| --- | --- |
|  | A new [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) representing the result of the inequality comparison. |

<hr class="docs-overload-divider">

<h2 id="or-b">or</h2>

```kotlin
public infix fun or(b: RemoteBoolean): RemoteBoolean
```

Logical OR operator for [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean)s.

Performs a bitwise OR operation on the underlying [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) values of this boolean and the
other [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean). The result is a new [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean).

#### Parameters

| | |
| --- | --- |
| b | The other [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) to perform the OR operation with. |

#### Returns

| | |
| --- | --- |
|  | A new [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) representing the result of the logical OR. |

<hr class="docs-overload-divider">

<h2 id="and-b">and</h2>

```kotlin
public infix fun and(b: RemoteBoolean): RemoteBoolean
```

Logical AND operator for [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean)s.

Performs a bitwise AND operation on the underlying [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) values of this boolean and the
other [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean). The result is a new [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean).

#### Parameters

| | |
| --- | --- |
| b | The other [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) to perform the AND operation with. |

#### Returns

| | |
| --- | --- |
|  | A new [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) representing the result of the logical AND. |

<hr class="docs-overload-divider">

<h2 id="xor-b">xor</h2>

```kotlin
public infix fun xor(b: RemoteBoolean): RemoteBoolean
```

Logical XOR operator for [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean)s.

Performs a bitwise XOR operation on the underlying [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) values of this boolean and the
other [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean). The result is a new [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean).

#### Parameters

| | |
| --- | --- |
| b | The other [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) to perform the XOR operation with. |

#### Returns

| | |
| --- | --- |
|  | A new [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) representing the result of the logical XOR. |

## Companion Object

#### Methods

<hr class="docs-overload-divider">

<h2 id="invoke-value">invoke</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
public operator fun invoke(value: Boolean): RemoteBoolean
```

Creates a [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) from a literal constant.

#### Parameters

| | |
| --- | --- |
| value | The constant `Boolean` value. |

#### Returns

| | |
| --- | --- |
|  | A [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) representing the constant boolean. |

<hr class="docs-overload-divider">

<h2 id="createnamedremoteboolean-name-defaultvalue-domain">createNamedRemoteBoolean</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
        @JvmStatic
        public fun createNamedRemoteBoolean(
            name: String,
            defaultValue: Boolean,
            domain: RemoteState.Domain = RemoteState.Domain.User,
        ): RemoteBoolean
```

Creates a named [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) with an initial value. Named remote booleans can be set
via AndroidRemoteContext.setNamedBoolean.

#### Parameters

| | |
| --- | --- |
| name | The unique name for this remote boolean. |
| domain | The domain of the named boolean (defaults to [RemoteState.Domain.User](/jetpack-compose/androidx.compose.remote/remote-creation-compose/objects/RemoteState.Domain.User)). |
| defaultValue | The initial `Boolean` value for the named remote boolean. |

#### Returns

| | |
| --- | --- |
|  | A [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) representing the named boolean. |