diff --git a/lib/sms_autofill.dart b/lib/sms_autofill.dart index 75a33de..f409bf2 100644 --- a/lib/sms_autofill.dart +++ b/lib/sms_autofill.dart @@ -202,6 +202,7 @@ class PhoneFormFieldHint extends StatelessWidget { final FormFieldValidator? validator; final InputDecoration? decoration; final TextField? child; + final TextStyle? style; const PhoneFormFieldHint({ Key? key, @@ -213,6 +214,7 @@ class PhoneFormFieldHint extends StatelessWidget { this.autoFocus = false, this.enabled = true, this.focusNode, + this.style, }) : super(key: key); @override @@ -227,7 +229,8 @@ class PhoneFormFieldHint extends StatelessWidget { autoFocus: autoFocus, enabled: enabled, focusNode: focusNode, - isFormWidget: true); + isFormWidget: true, + style: style); } } @@ -238,6 +241,7 @@ class PhoneFieldHint extends StatelessWidget { final List? inputFormatters; final InputDecoration? decoration; final TextField? child; + final TextStyle? style; const PhoneFieldHint({ Key? key, @@ -247,6 +251,7 @@ class PhoneFieldHint extends StatelessWidget { this.decoration, this.autoFocus = false, this.focusNode, + this.style, }) : super(key: key); @override @@ -259,6 +264,7 @@ class PhoneFieldHint extends StatelessWidget { decoration: decoration, autoFocus: autoFocus, focusNode: focusNode, + style: style, isFormWidget: false); } } @@ -272,6 +278,7 @@ class _PhoneFieldHint extends StatefulWidget { final bool isFormWidget; final InputDecoration? decoration; final TextField? child; + final TextStyle? style; const _PhoneFieldHint({ Key? key, @@ -284,6 +291,7 @@ class _PhoneFieldHint extends StatefulWidget { this.autoFocus = false, this.enabled = true, this.focusNode, + this.style, }) : super(key: key); @override @@ -319,7 +327,6 @@ class _PhoneFieldHintState extends State<_PhoneFieldHint> { }); } }); - super.initState(); } @@ -371,6 +378,7 @@ class _PhoneFieldHintState extends State<_PhoneFieldHint> { decoration: decoration, controller: _controller, keyboardType: TextInputType.phone, + style: widget.style, ); } @@ -386,6 +394,7 @@ class _PhoneFieldHintState extends State<_PhoneFieldHint> { decoration: decoration, controller: _controller, keyboardType: TextInputType.phone, + style: widget.style, ); }