Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
Crm Attendance
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dio Maulana
Crm Attendance
Commits
670fc2a3
Commit
670fc2a3
authored
Jun 22, 2023
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
textfield khusus password mode
parent
40acdcbf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
0 deletions
+52
-0
password_input.dart
lib/helper/component/password_input.dart
+52
-0
No files found.
lib/helper/component/password_input.dart
0 → 100644
View file @
670fc2a3
import
'package:excelso_attendance/helper/component/text_field.dart'
;
import
'package:flutter/material.dart'
;
class
PasswordInput
extends
StatefulWidget
{
const
PasswordInput
({
Key
?
key
,
required
this
.
passwordController
,
this
.
onChanged
,
this
.
labelText
=
"Password"
,
this
.
labelColor
,
this
.
marginTop
,
this
.
borderSideActive
=
false
,
this
.
textInputType
=
TextInputType
.
text
,
})
:
super
(
key:
key
);
final
TextEditingController
passwordController
;
final
void
Function
(
String
val
)?
onChanged
;
final
String
labelText
;
final
Color
?
labelColor
;
final
double
?
marginTop
;
final
bool
borderSideActive
;
final
TextInputType
textInputType
;
@override
State
<
PasswordInput
>
createState
()
=>
_PasswordInputState
();
}
class
_PasswordInputState
extends
State
<
PasswordInput
>
{
bool
secure
=
true
;
@override
Widget
build
(
BuildContext
context
)
{
return
InputTextField
(
controller:
widget
.
passwordController
,
labelText:
widget
.
labelText
,
labelColor:
widget
.
labelColor
,
marginTop:
widget
.
marginTop
,
marginActive:
false
,
onChanged:
widget
.
onChanged
,
secure:
secure
,
isSuffixActive:
true
,
borderSideActive:
widget
.
borderSideActive
,
hintText:
widget
.
labelText
,
inputType:
widget
.
textInputType
,
suffixIcon:
(
secure
)
?
Icons
.
visibility_off
:
Icons
.
visibility
,
onSuffixPress:
()
{
setState
(()
{
secure
=
!
secure
;
});
},
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment