Skip to content

Commit 5c84c19

Browse files
committed
Credit Card Screen Fixed
1 parent f4901c7 commit 5c84c19

File tree

2 files changed

+49
-47
lines changed

2 files changed

+49
-47
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>BuildSystemType</key>
6+
<string>Original</string>
7+
</dict>
8+
</plist>

lib/ui/page/payment/credit_card_page.dart

Lines changed: 41 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import 'package:flutter/material.dart';
2+
import 'package:flutter_masked_text/flutter_masked_text.dart';
23
import 'package:flutter_uikit/logic/bloc/credit_card_bloc.dart';
34
import 'package:flutter_uikit/ui/widgets/profile_tile.dart';
45
import 'package:flutter_uikit/utils/uidata.dart';
56
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
6-
import 'package:flutter_masked_text/flutter_masked_text.dart';
77

88
class CreditCardPage extends StatelessWidget {
99
BuildContext _context;
@@ -41,6 +41,30 @@ class CreditCardPage extends StatelessWidget {
4141
),
4242
),
4343
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+
),
4468
],
4569
),
4670
),
@@ -51,17 +75,9 @@ class CreditCardPage extends StatelessWidget {
5175
Widget cardEntries() => Padding(
5276
padding: const EdgeInsets.all(16.0),
5377
child: Column(
54-
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
78+
mainAxisAlignment: MainAxisAlignment.spaceAround,
5579
crossAxisAlignment: CrossAxisAlignment.start,
5680
children: <Widget>[
57-
Align(
58-
alignment: Alignment.topRight,
59-
child: Icon(
60-
FontAwesomeIcons.ccVisa,
61-
size: 40.0,
62-
color: Colors.white,
63-
),
64-
),
6581
StreamBuilder<String>(
6682
stream: cardBloc.ccOutputStream,
6783
initialData: "**** **** **** ****",
@@ -73,12 +89,9 @@ class CreditCardPage extends StatelessWidget {
7389
snapshot.data.length > 0
7490
? snapshot.data
7591
: "**** **** **** ****",
76-
style: TextStyle(color: Colors.white, fontSize: 25.0),
92+
style: TextStyle(color: Colors.white, fontSize: 22.0),
7793
);
7894
}),
79-
SizedBox(
80-
height: 20.0,
81-
),
8295
Row(
8396
mainAxisAlignment: MainAxisAlignment.start,
8497
children: <Widget>[
@@ -110,22 +123,6 @@ class CreditCardPage extends StatelessWidget {
110123
)),
111124
],
112125
),
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-
),
129126
],
130127
),
131128
);
@@ -189,23 +186,20 @@ class CreditCardPage extends StatelessWidget {
189186
),
190187
);
191188

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),
209203
),
210204
),
211205
);

0 commit comments

Comments
 (0)