mirror of
https://github.com/wger-project/flutter.git
synced 2026-12-02 10:09:11 +01:00
Put control body in new line
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -225,7 +225,9 @@ class _AddExerciseStepperState extends State<AddExerciseStepper> {
|
||||
language.shortName,
|
||||
);
|
||||
|
||||
if (!mounted) return;
|
||||
if (!mounted) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (error != null) {
|
||||
setState(() {
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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(() {});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user