Skip to content

Commit 0c1dd91

Browse files
committed
chore: closes #48
1 parent 8675e33 commit 0c1dd91

File tree

4 files changed

+6
-14
lines changed

4 files changed

+6
-14
lines changed

lib/src/widgets/base_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ abstract class BaseState<T extends StatefulWidget> extends State<T> {
3737

3838
var dialog = Platform.isIOS
3939
? new CupertinoAlertDialog(
40-
title: text,
40+
content: text,
4141
actions: <Widget>[
4242
new CupertinoDialogAction(
4343
child: const Text('Yes'),

lib/src/widgets/input/otp_field.dart

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,15 @@ import 'package:flutter/services.dart';
44
class OtpField extends TextFormField {
55
OtpField({FormFieldSetter<String> onSaved, @required Color borderColor})
66
: super(
7-
keyboardType: TextInputType.number,
7+
keyboardType: TextInputType.text,
8+
textCapitalization: TextCapitalization.none,
89
textAlign: TextAlign.center,
910
style: TextStyle(
1011
fontWeight: FontWeight.bold,
1112
color: Colors.black87,
12-
fontSize: 25.0
13+
fontSize: 25.0,
1314
),
1415
autofocus: true,
15-
inputFormatters: [
16-
WhitelistingTextInputFormatter.digitsOnly,
17-
],
1816
maxLines: 1,
1917
onSaved: onSaved,
2018
validator: (String value) => value.isEmpty ? 'Enter OTP' : null,
@@ -23,8 +21,7 @@ class OtpField extends TextFormField {
2321
border: OutlineInputBorder(),
2422
isDense: true,
2523
hintText: 'ENTER',
26-
hintStyle: const TextStyle(
27-
color: Colors.grey, fontSize: 14.0),
24+
hintStyle: const TextStyle(color: Colors.grey, fontSize: 14.0),
2825
contentPadding: const EdgeInsets.all(10.0),
2926
enabledBorder: OutlineInputBorder(
3027
borderSide: const BorderSide(color: Colors.grey, width: 0.5)),

lib/src/widgets/otp_widget.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ class _OtpWidgetState extends BaseState<OtpWidget> {
2020
String _otp;
2121
var heightBox = const SizedBox(height: 20.0);
2222

23-
@override
24-
void initState() {
25-
confirmationMessage = 'Do you want cancel OTP?';
26-
super.initState();
27-
}
2823

2924
@override
3025
Widget buildChild(BuildContext context) {

lib/src/widgets/pin_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class _PinWidgetState extends BaseState<PinWidget> {
1515

1616
@override
1717
void initState() {
18-
confirmationMessage = 'Do you want cancel PIN?';
18+
confirmationMessage = 'Do you want to cancel PIN input?';
1919
super.initState();
2020
}
2121

0 commit comments

Comments
 (0)