fromOrdinal

fun fromOrdinal(ordinal: Int): Theme

Creates a Theme instance from its ordinal value.

This is the inverse operation of ordinal, used for deserialization and restoration from persistent storage.

Return

The corresponding Theme instance.

Parameters

ordinal

The ordinal value representing the theme: - 0 for Light - 1 for Dark - 2 for System

Throws

if the ordinal value is not valid.