Skip to content

Commit cf65879

Browse files
committed
⚙️✏️ Text widget to Flexible for widget fitting
1 parent c4828b4 commit cf65879

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

lib/widgets/custom_button.dart

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ class CustomButton extends StatelessWidget {
3333
children: [
3434
Icon(icon, color: Colors.white, size: 18),
3535
const SizedBox(width: 8),
36-
Text(
37-
text,
38-
style: const TextStyle(
39-
color: Colors.white,
40-
fontSize: 16,
41-
fontWeight: FontWeight.w500,
36+
Flexible(
37+
child: Text(
38+
text,
39+
style: const TextStyle(
40+
color: Colors.white,
41+
fontSize: 16,
42+
fontWeight: FontWeight.w500,
43+
),
4244
),
4345
),
4446
],
@@ -93,12 +95,14 @@ class CustomOutlinedButton extends StatelessWidget {
9395
children: [
9496
Icon(icon, color: Colors.white, size: 18),
9597
const SizedBox(width: 8),
96-
Text(
97-
text,
98-
style: const TextStyle(
99-
color: Colors.white,
100-
fontSize: 16,
101-
fontWeight: FontWeight.w500,
98+
Flexible(
99+
child: Text(
100+
text,
101+
style: const TextStyle(
102+
color: Colors.white,
103+
fontSize: 16,
104+
fontWeight: FontWeight.w500,
105+
),
102106
),
103107
),
104108
],

0 commit comments

Comments
 (0)