Skip to content

Commit

Permalink
Fix code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
evgfilim1 committed Mar 25, 2024
1 parent 7d14db3 commit 076f346
Showing 1 changed file with 28 additions and 31 deletions.
59 changes: 28 additions & 31 deletions lib/widgets/list_tiles/text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class _EditorDialog extends StatefulWidget {
this.labelText,
this.validator,
this.onSubmit,
});
});

@override
State<_EditorDialog> createState() => _EditorDialogState();
Expand Down Expand Up @@ -68,39 +68,36 @@ class _EditorDialogState extends State<_EditorDialog> {

@override
Widget build(BuildContext context) => AlertDialog(
title: widget.title,
content: Form(
key: _formKey,
child: TextFormField(
controller: _controller,
keyboardType: widget.keyboardType,
textCapitalization: widget.textCapitalization ?? TextCapitalization.none,
autofocus: true,
decoration: InputDecoration(
border: const OutlineInputBorder(),
labelText: widget.labelText,
suffix: _validationInProgress
? const CircularProgressIndicator()
: null,
title: widget.title,
content: Form(
key: _formKey,
child: TextFormField(
controller: _controller,
keyboardType: widget.keyboardType,
textCapitalization: widget.textCapitalization ?? TextCapitalization.none,
autofocus: true,
decoration: InputDecoration(
border: const OutlineInputBorder(),
labelText: widget.labelText,
suffix: _validationInProgress ? const CircularProgressIndicator() : null,
),
validator: _validator,
onFieldSubmitted: (_) async => _onSaved(context),
),
),
validator: _validator,
onFieldSubmitted: (_) async => _onSaved(context),
),
),
actions: [
TextButton(
onPressed: () => Navigator.pop(context),
child: const Text("Отмена"),
),
TextButton(
onPressed: () => _onSaved(context),
child: const Text("Применить"),
),
],
);
actions: [
TextButton(
onPressed: () => Navigator.pop(context),
child: const Text("Отмена"),
),
TextButton(
onPressed: () => _onSaved(context),
child: const Text("Применить"),
),
],
);
}


class TextFieldListTile extends StatelessWidget {
final Widget? leading;
final Widget title;
Expand Down

0 comments on commit 076f346

Please sign in to comment.