AI Features

Switching Themes Using FAB

In this lesson, you'll learn how to use a floating action button (FAB for short) to toggle between dark theme to light theme and vice versa.

Switching themes using FAB

A floating action button (FAB) represents the primary action on the screen. Let’s add a FAB to toggle between dark and light themes.

Theme types using enum

We’ll use an enum to hold the available themes. Enumeration ...