Skip to content

Commit dc8777a

Browse files
committed
manage size text field and button
1 parent 15d8d48 commit dc8777a

9 files changed

+72
-74
lines changed

lib/pages/listArticle.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ class ListArticle extends StatelessWidget {
150150
color: neutral_100,
151151
),
152152
title: TextField(
153+
style: body2RegulerShade50,
154+
cursorColor: neutral_50,
153155
decoration: InputDecoration(
154156
hintText: "Cari topik kesukaanmu disini...",
155157
hintStyle: TextStyle(
@@ -226,7 +228,7 @@ class ListArticle extends StatelessWidget {
226228
height: 8,
227229
),
228230
Text(
229-
"Saya",
231+
"Profil",
230232
style: tab == 2
231233
? label1RegulerShade50
232234
: label1RegulerShade200,

lib/pages/login.dart

+16-19
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ class Login extends StatelessWidget {
5151
cursorColor: neutral_50,
5252
obscureText: stylePassword,
5353
decoration: InputDecoration(
54-
contentPadding:
55-
const EdgeInsets.symmetric(vertical: 20, horizontal: 20),
54+
contentPadding: textFieldSize,
5655
focusedBorder: OutlineInputBorder(
5756
borderSide: BorderSide(color: primary)),
5857
border: InputBorder.none,
@@ -65,24 +64,22 @@ class Login extends StatelessWidget {
6564
}
6665

6766
btnLogin() {
68-
return SizedBox(
69-
height: 52,
70-
child: ElevatedButton(
71-
onPressed: () {
72-
if (condition == 'baca') {
73-
Navigator.push(
74-
context, MaterialPageRoute(builder: (context) => HomePage()));
75-
} else {
76-
Navigator.push(context,
77-
MaterialPageRoute(builder: (context) => WritePage()));
78-
}
79-
},
80-
child: Text(
81-
'Masuk',
82-
style: body1Reguler,
83-
),
84-
style: ElevatedButton.styleFrom(backgroundColor: primary),
67+
return ElevatedButton(
68+
onPressed: () {
69+
if (condition == 'baca') {
70+
Navigator.push(
71+
context, MaterialPageRoute(builder: (context) => HomePage()));
72+
} else {
73+
Navigator.push(
74+
context, MaterialPageRoute(builder: (context) => WritePage()));
75+
}
76+
},
77+
child: Text(
78+
'Masuk',
79+
style: body2RegulerShade50,
8580
),
81+
style: ElevatedButton.styleFrom(
82+
backgroundColor: primary, padding: btnSize),
8683
);
8784
}
8885

lib/pages/read.dart

+6-3
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,13 @@ class _ReadingPageState extends State<ReadingPage> {
7575
Navigator.push(
7676
context, MaterialPageRoute(builder: (context) => HomePage()));
7777
},
78-
icon: const Icon(Icons.subdirectory_arrow_left),
78+
icon: const Icon(
79+
Icons.subdirectory_arrow_left,
80+
size: 14,
81+
),
7982
label: Text(
8083
"Baca Artikel Lainnya",
81-
style: body1Reguler,
84+
style: body2RegulerShade50,
8285
),
8386
style:
8487
ElevatedButton.styleFrom(backgroundColor: primary, padding: btnSize),
@@ -88,7 +91,7 @@ class _ReadingPageState extends State<ReadingPage> {
8891
@override
8992
Widget build(BuildContext context) {
9093
return MaterialApp(
91-
title: 'read ${title}',
94+
title: 'arK | Baca',
9295
home: Scaffold(
9396
body: Stack(
9497
children: [

lib/pages/signup.dart

+19-23
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,12 @@ class Signup extends StatelessWidget {
4848
color: neutral_800,
4949
borderRadius: const BorderRadius.all(Radius.circular(5))),
5050
child: TextField(
51-
style: TextStyle(color: neutral_50),
51+
style: body2BoldShade50,
5252
cursorColor: neutral_50,
5353
obscureText: stylePassword,
5454
keyboardType: TextInputType.emailAddress,
5555
decoration: InputDecoration(
56-
contentPadding: const EdgeInsets.symmetric(
57-
vertical: 20, horizontal: 20),
56+
contentPadding: textFieldSize,
5857
focusedBorder: OutlineInputBorder(
5958
borderSide: BorderSide(color: primary)),
6059
border: InputBorder.none,
@@ -81,12 +80,11 @@ class Signup extends StatelessWidget {
8180
color: neutral_800,
8281
borderRadius: const BorderRadius.all(Radius.circular(5))),
8382
child: TextField(
84-
style: TextStyle(color: neutral_50),
83+
style: body2BoldShade50,
8584
cursorColor: neutral_50,
8685
obscureText: stylePassword,
8786
decoration: InputDecoration(
88-
contentPadding: const EdgeInsets.symmetric(
89-
vertical: 20, horizontal: 20),
87+
contentPadding: textFieldSize,
9088
focusedBorder: OutlineInputBorder(
9189
borderSide: BorderSide(color: primary)),
9290
border: InputBorder.none,
@@ -100,24 +98,22 @@ class Signup extends StatelessWidget {
10098
}
10199

102100
btnLogin() {
103-
return SizedBox(
104-
height: 52,
105-
child: ElevatedButton(
106-
onPressed: () {
107-
if (condition == 'baca') {
108-
Navigator.push(
109-
context, MaterialPageRoute(builder: (context) => HomePage()));
110-
} else {
111-
Navigator.push(context,
112-
MaterialPageRoute(builder: (context) => WritePage()));
113-
}
114-
},
115-
child: Text(
116-
'Daftar',
117-
style: body1Reguler,
118-
),
119-
style: ElevatedButton.styleFrom(backgroundColor: primary),
101+
return ElevatedButton(
102+
onPressed: () {
103+
if (condition == 'baca') {
104+
Navigator.push(
105+
context, MaterialPageRoute(builder: (context) => HomePage()));
106+
} else {
107+
Navigator.push(
108+
context, MaterialPageRoute(builder: (context) => WritePage()));
109+
}
110+
},
111+
child: Text(
112+
'Daftar',
113+
style: body2RegulerShade50,
120114
),
115+
style: ElevatedButton.styleFrom(
116+
backgroundColor: primary, padding: btnSize),
121117
);
122118
}
123119

lib/pages/starting.dart

+12-10
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,16 @@ class StartingUp extends StatelessWidget {
6565
width: MediaQuery.of(context).size.width,
6666
child: ElevatedButton.icon(
6767
onPressed: () {
68-
// Navigator.push(context,
69-
// MaterialPageRoute(builder: (context) => Login("baca")));
70-
Navigator.push(
71-
context,
72-
MaterialPageRoute(
73-
builder: (context) => const HomePage()));
68+
Navigator.push(context,
69+
MaterialPageRoute(builder: (context) => Login("baca")));
7470
},
75-
icon: const Icon(Icons.menu_book),
71+
icon: const Icon(
72+
Icons.menu_book,
73+
size: 18,
74+
),
7675
label: Text(
7776
"Baca Artikel",
78-
style: body1Reguler,
77+
style: body2RegulerShade50,
7978
),
8079
style: ElevatedButton.styleFrom(
8180
backgroundColor: primary, padding: btnSize),
@@ -95,10 +94,13 @@ class StartingUp extends StatelessWidget {
9594
MaterialPageRoute(
9695
builder: (context) => Login("tulis")));
9796
},
98-
icon: const Icon(Icons.create),
97+
icon: Icon(
98+
Icons.create,
99+
size: 18,
100+
),
99101
label: Text(
100102
"Tulis Artikelmu",
101-
style: body1Reguler,
103+
style: body2RegulerShade50,
102104
),
103105
style: OutlinedButton.styleFrom(
104106
foregroundColor: neutral_50,

lib/pages/write.dart

+8-9
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,14 @@ class WritePage extends StatelessWidget {
4141
height: 40,
4242
child: ElevatedButton.icon(
4343
onPressed: () {},
44-
icon: const Icon(
44+
icon: Icon(
4545
Icons.upload,
4646
size: 14,
47+
color: neutral_50,
4748
),
48-
label: const Text(
49+
label: Text(
4950
"Unggah",
50-
style: TextStyle(fontSize: 14),
51+
style: body2RegulerShade50,
5152
),
5253
style: ElevatedButton.styleFrom(backgroundColor: primary),
5354
),
@@ -76,11 +77,10 @@ class WritePage extends StatelessWidget {
7677
child: TextField(
7778
style: TextStyle(color: neutral_50),
7879
cursorColor: neutral_50,
79-
minLines: 15,
80+
minLines: 8,
8081
maxLines: null,
8182
decoration: InputDecoration(
82-
contentPadding:
83-
const EdgeInsets.symmetric(vertical: 20, horizontal: 20),
83+
contentPadding: const EdgeInsets.all(20),
8484
focusedBorder: OutlineInputBorder(
8585
borderSide: BorderSide(color: primary)),
8686
border: InputBorder.none,
@@ -104,7 +104,7 @@ class WritePage extends StatelessWidget {
104104
),
105105
Container(
106106
margin: const EdgeInsets.only(top: 8),
107-
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 10),
107+
padding: const EdgeInsets.all(10),
108108
decoration: BoxDecoration(
109109
border: Border.all(color: neutral_800),
110110
borderRadius: const BorderRadius.all(Radius.circular(5))),
@@ -155,8 +155,7 @@ class WritePage extends StatelessWidget {
155155
style: TextStyle(color: neutral_50),
156156
cursorColor: neutral_50,
157157
decoration: InputDecoration(
158-
contentPadding:
159-
const EdgeInsets.symmetric(vertical: 20, horizontal: 20),
158+
contentPadding: textFieldSize,
160159
focusedBorder: OutlineInputBorder(
161160
borderSide: BorderSide(color: primary)),
162161
border: InputBorder.none,

lib/pages/writerAccount.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ class WriterAccountPage extends StatelessWidget {
370370
height: 8,
371371
),
372372
Text(
373-
"Saya",
373+
"Profil",
374374
style: tab == 2
375375
? label1RegulerShade50
376376
: label1RegulerShade200,
@@ -412,7 +412,7 @@ class WriterAccountPage extends StatelessWidget {
412412
}
413413

414414
return MaterialApp(
415-
title: 'arK | Artikel Kulo',
415+
title: 'arK | Penulis',
416416
home: Scaffold(
417417
backgroundColor: neutral_900,
418418
appBar: AppBar(

lib/pages/yourAccount.dart

+5-7
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class YourAccountPage extends StatelessWidget {
4040
children: <Widget>[
4141
//! SECONDARY BUTTON
4242
SizedBox(
43-
height: 50,
4443
width: MediaQuery.of(context).size.width * 0.42,
4544
child: OutlinedButton(
4645
onPressed: () {},
@@ -50,13 +49,13 @@ class YourAccountPage extends StatelessWidget {
5049
),
5150
style: OutlinedButton.styleFrom(
5251
foregroundColor: neutral_50,
53-
side: BorderSide(color: neutral_50)),
52+
side: BorderSide(color: neutral_50),
53+
padding: btnSize),
5454
),
5555
),
5656
//! SECONDARY BUTTON
5757
//! PRIMARY BUTTON
5858
SizedBox(
59-
height: 50,
6059
width: MediaQuery.of(context).size.width * 0.42,
6160
child: ElevatedButton(
6261
onPressed: () {
@@ -82,8 +81,7 @@ class YourAccountPage extends StatelessWidget {
8281
],
8382
),
8483
style: ElevatedButton.styleFrom(
85-
backgroundColor: primary,
86-
),
84+
backgroundColor: primary, padding: btnSize),
8785
),
8886
),
8987
//! PRIMARY BUTTON
@@ -300,7 +298,7 @@ class YourAccountPage extends StatelessWidget {
300298
height: 8,
301299
),
302300
Text(
303-
"Saya",
301+
"Profil",
304302
style: tab == 2
305303
? label1RegulerShade50
306304
: label1RegulerShade200,
@@ -342,7 +340,7 @@ class YourAccountPage extends StatelessWidget {
342340
}
343341

344342
return MaterialApp(
345-
title: 'arK | Artikel Kulo',
343+
title: 'arK | Profil',
346344
home: Scaffold(
347345
backgroundColor: neutral_900,
348346
appBar: AppBar(

lib/style/design_system.dart

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:flutter/material.dart';
22

33
EdgeInsets btnSize = const EdgeInsets.symmetric(vertical: 24);
4+
EdgeInsets textFieldSize = const EdgeInsets.fromLTRB(20, 10, 10, 10);
45

56
//! Color Scheme
67
Color neutral_900 = const Color(0xff252525);

0 commit comments

Comments
 (0)