Skip to content

Commit 012fbfa

Browse files
committed
feat(Refactoring): Added const constructor
1 parent 6a95d51 commit 012fbfa

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/app/util/formatters/first_character_is_not_digit_formatter.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import 'package:flutter/services.dart';
22

33
class FirstCharacterNotDigitFormatter extends TextInputFormatter {
4+
const FirstCharacterNotDigitFormatter();
5+
46
@override
57
TextEditingValue formatEditUpdate(
68
TextEditingValue oldValue,

lib/presentation/screen/screens_screen/widgets/add_screen_dialog.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class _AddScreenDialogState extends State<AddScreenDialog> {
9696
onSubmitted: (_) => _onOk(context),
9797
placeholder: S.of(context).screenName,
9898
inputFormatters: [
99-
FirstCharacterNotDigitFormatter(),
99+
const FirstCharacterNotDigitFormatter(),
100100
FilteringTextInputFormatter.allow(
101101
AppConsts.digitsAndLatinLetters,
102102
),

0 commit comments

Comments
 (0)