1
1
import 'package:flutter/material.dart' ;
2
+ import 'package:flutter_masked_text/flutter_masked_text.dart' ;
2
3
import 'package:flutter_uikit/logic/bloc/credit_card_bloc.dart' ;
3
4
import 'package:flutter_uikit/ui/widgets/profile_tile.dart' ;
4
5
import 'package:flutter_uikit/utils/uidata.dart' ;
5
6
import 'package:font_awesome_flutter/font_awesome_flutter.dart' ;
6
- import 'package:flutter_masked_text/flutter_masked_text.dart' ;
7
7
8
8
class CreditCardPage extends StatelessWidget {
9
9
BuildContext _context;
@@ -41,6 +41,30 @@ class CreditCardPage extends StatelessWidget {
41
41
),
42
42
),
43
43
cardEntries (),
44
+ Positioned (
45
+ right: 10.0 ,
46
+ top: 10.0 ,
47
+ child: Icon (
48
+ FontAwesomeIcons .ccVisa,
49
+ size: 30.0 ,
50
+ color: Colors .white,
51
+ ),
52
+ ),
53
+ Positioned (
54
+ right: 10.0 ,
55
+ bottom: 10.0 ,
56
+ child: StreamBuilder <String >(
57
+ stream: cardBloc.nameOutputStream,
58
+ initialData: "Your Name" ,
59
+ builder: (context, snapshot) => Text (
60
+ snapshot.data.length > 0 ? snapshot.data : "Your Name" ,
61
+ style: TextStyle (
62
+ color: Colors .white,
63
+ fontFamily: UIData .ralewayFont,
64
+ fontSize: 20.0 ),
65
+ ),
66
+ ),
67
+ ),
44
68
],
45
69
),
46
70
),
@@ -51,17 +75,9 @@ class CreditCardPage extends StatelessWidget {
51
75
Widget cardEntries () => Padding (
52
76
padding: const EdgeInsets .all (16.0 ),
53
77
child: Column (
54
- mainAxisAlignment: MainAxisAlignment .spaceEvenly ,
78
+ mainAxisAlignment: MainAxisAlignment .spaceAround ,
55
79
crossAxisAlignment: CrossAxisAlignment .start,
56
80
children: < Widget > [
57
- Align (
58
- alignment: Alignment .topRight,
59
- child: Icon (
60
- FontAwesomeIcons .ccVisa,
61
- size: 40.0 ,
62
- color: Colors .white,
63
- ),
64
- ),
65
81
StreamBuilder <String >(
66
82
stream: cardBloc.ccOutputStream,
67
83
initialData: "**** **** **** ****" ,
@@ -73,12 +89,9 @@ class CreditCardPage extends StatelessWidget {
73
89
snapshot.data.length > 0
74
90
? snapshot.data
75
91
: "**** **** **** ****" ,
76
- style: TextStyle (color: Colors .white, fontSize: 25 .0 ),
92
+ style: TextStyle (color: Colors .white, fontSize: 22 .0 ),
77
93
);
78
94
}),
79
- SizedBox (
80
- height: 20.0 ,
81
- ),
82
95
Row (
83
96
mainAxisAlignment: MainAxisAlignment .start,
84
97
children: < Widget > [
@@ -110,22 +123,6 @@ class CreditCardPage extends StatelessWidget {
110
123
)),
111
124
],
112
125
),
113
- Expanded (
114
- child: Align (
115
- alignment: Alignment .centerRight,
116
- child: StreamBuilder <String >(
117
- stream: cardBloc.nameOutputStream,
118
- initialData: "Your Name" ,
119
- builder: (context, snapshot) => Text (
120
- snapshot.data.length > 0 ? snapshot.data : "Your Name" ,
121
- style: TextStyle (
122
- color: Colors .white,
123
- fontFamily: UIData .ralewayFont,
124
- fontSize: 20.0 ),
125
- ),
126
- ),
127
- ),
128
- ),
129
126
],
130
127
),
131
128
);
@@ -189,23 +186,20 @@ class CreditCardPage extends StatelessWidget {
189
186
),
190
187
);
191
188
192
- Widget floatingBar () => Material (
193
- shape: StadiumBorder (),
194
- elevation: 3.0 ,
195
- child: Ink (
196
- decoration: BoxDecoration (
197
- gradient: LinearGradient (colors: UIData .kitGradients)),
198
- child: FloatingActionButton .extended (
199
- onPressed: () {},
200
- backgroundColor: Colors .transparent,
201
- icon: Icon (
202
- FontAwesomeIcons .amazonPay,
203
- color: Colors .white,
204
- ),
205
- label: Text (
206
- "Continue" ,
207
- style: TextStyle (color: Colors .white),
208
- ),
189
+ Widget floatingBar () => Ink (
190
+ decoration: ShapeDecoration (
191
+ shape: StadiumBorder (),
192
+ gradient: LinearGradient (colors: UIData .kitGradients)),
193
+ child: FloatingActionButton .extended (
194
+ onPressed: () {},
195
+ backgroundColor: Colors .transparent,
196
+ icon: Icon (
197
+ FontAwesomeIcons .amazonPay,
198
+ color: Colors .white,
199
+ ),
200
+ label: Text (
201
+ "Continue" ,
202
+ style: TextStyle (color: Colors .white),
209
203
),
210
204
),
211
205
);
0 commit comments