@@ -13,10 +13,17 @@ class _SignPageFiveState extends State<SignPageFive> {
13
13
TextEditingController _emailController = TextEditingController ();
14
14
TextEditingController _passwordController = TextEditingController ();
15
15
16
+ bool _isSelected = false ;
17
+
18
+ _selectType (bool isSelected) {
19
+ setState (() {
20
+ _isSelected = isSelected;
21
+ });
22
+ }
23
+
16
24
@override
17
25
Widget build (BuildContext context) {
18
26
final double statusbarHeight = MediaQuery .of (context).padding.top;
19
- final bool isSelected = false ;
20
27
return Scaffold (
21
28
resizeToAvoidBottomPadding: false ,
22
29
appBar: SignupApbar (
@@ -48,24 +55,36 @@ class _SignPageFiveState extends State<SignPageFive> {
48
55
crossAxisAlignment: CrossAxisAlignment .end,
49
56
mainAxisAlignment: MainAxisAlignment .spaceEvenly,
50
57
children: < Widget > [
51
- Text (
52
- "LOGIN" ,
53
- style: TextStyle (
54
- fontSize: 28 ,
55
- fontWeight: FontWeight .bold,
56
- letterSpacing: 1.5 ,
57
- wordSpacing: 1.5 ,
58
- color: Colors .black87,
58
+ InkWell (
59
+ onTap: () => _selectType (false ),
60
+ child: Opacity (
61
+ opacity: _isSelected ? 0.5 : 1 ,
62
+ child: Text (
63
+ "LOGIN" ,
64
+ style: TextStyle (
65
+ fontSize: 28 ,
66
+ fontWeight: FontWeight .bold,
67
+ letterSpacing: 1.5 ,
68
+ wordSpacing: 1.5 ,
69
+ color: Colors .black87,
70
+ ),
71
+ ),
59
72
),
60
73
),
61
- Text (
62
- "SIGNUP" ,
63
- style: TextStyle (
64
- fontSize: 28 ,
65
- fontWeight: FontWeight .bold,
66
- letterSpacing: 1.5 ,
67
- wordSpacing: 1.5 ,
68
- color: Colors .black26,
74
+ InkWell (
75
+ onTap: () => _selectType (true ),
76
+ child: Opacity (
77
+ opacity: _isSelected ? 1 : 0.5 ,
78
+ child: Text (
79
+ "SIGNUP" ,
80
+ style: TextStyle (
81
+ fontSize: 28 ,
82
+ fontWeight: FontWeight .bold,
83
+ letterSpacing: 1.5 ,
84
+ wordSpacing: 1.5 ,
85
+ color: Colors .black87,
86
+ ),
87
+ ),
69
88
),
70
89
),
71
90
],
0 commit comments