toggledCase property

String get toggledCase

Toggles the case of each character.

Implementation

String get toggledCase => characters
    .map((e) => e.toUpperCase() == e ? e.toLowerCase() : e.toUpperCase())
    .join();