togglePreview method
Toggles the preview visibility.
Implementation
void togglePreview() {
state = state.copyWith(showPreview: !state.showPreview);
}
Toggles the preview visibility.
void togglePreview() {
state = state.copyWith(showPreview: !state.showPreview);
}