Put control body in new line

This commit is contained in:
Roland Geider
2026-05-07 21:30:36 +02:00
parent 3771740099
commit bfc1ee92a2
4 changed files with 18 additions and 6 deletions

View File

@@ -39,7 +39,9 @@ String _bytesToUuid(Uint8List bytes) {
final sb = StringBuffer();
for (var i = 0; i < bytes.length; i++) {
sb.write(bytes[i].toRadixString(16).padLeft(2, '0'));
if (i == 3 || i == 5 || i == 7 || i == 9) sb.write('-');
if (i == 3 || i == 5 || i == 7 || i == 9) {
sb.write('-');
}
}
return sb.toString();
}

View File

@@ -225,7 +225,9 @@ class _AddExerciseStepperState extends State<AddExerciseStepper> {
language.shortName,
);
if (!mounted) return;
if (!mounted) {
return;
}
if (error != null) {
setState(() {

View File

@@ -119,7 +119,9 @@ class _MarkdownEditorState extends State<MarkdownEditor> {
// Notify parent and rebuild preview on every controller change.
_controller.addListener(() {
widget.onChanged(_controller.text);
if (mounted) setState(() {});
if (mounted) {
setState(() {});
}
});
}
@@ -164,7 +166,9 @@ class _MarkdownEditorState extends State<MarkdownEditor> {
Widget _buildToolbar() {
final i18n = AppLocalizations.of(context);
if (!widget.showToolbar || widget.readOnly) return const SizedBox.shrink();
if (!widget.showToolbar || widget.readOnly) {
return const SizedBox.shrink();
}
return Row(
children: [
IconButton(

View File

@@ -47,7 +47,9 @@ class _TimerWidgetState extends State<TimerWidget> {
_uiTimer = Timer.periodic(const Duration(seconds: 1), (_) {
// ignore: no-empty-block, avoid-empty-setstate
if (mounted) setState(() {});
if (mounted) {
setState(() {});
}
});
}
@@ -109,7 +111,9 @@ class _TimerCountdownWidgetState extends ConsumerState<TimerCountdownWidget> {
_uiTimer = Timer.periodic(const Duration(seconds: 1), (_) {
// ignore: no-empty-block, avoid-empty-setstate
if (mounted) setState(() {});
if (mounted) {
setState(() {});
}
});
}