Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the right overflow of small cards in the cards section. #199

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions lib/ui_components/cards/All Cards/blog_card/card_2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,42 @@ class SecondCard extends StatelessWidget {
children: [
Container(
padding: const EdgeInsets.only(left: 5, top: 2, bottom: 2),
height: (MediaQuery.of(context).size.width / 2.4) * 0.83,

width: MediaQuery.of(context).size.width -
MediaQuery.of(context).size.width / 2.4 -
8,
child: const Column(
32,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
const Text(
"Politics",
style: TextStyle(fontSize: 10, color: Colors.grey),
),
Text(
const Text(
"EU funds won't be conditional upon European Values",
style: TextStyle(
fontSize: 12,
color: Color.fromARGB(255, 54, 103, 144),
fontWeight: FontWeight.w500),
),
Text(
const Text(
"The European Union (EU) is a political and economic union of 27 European countries. It aims to promote cooperation",
style: TextStyle(fontSize: 10, color: Colors.grey),
),
FittedBox(
fit: BoxFit.fitHeight,
child: Row(
children: [
CircleAvatar(
const CircleAvatar(
radius: 15,
),
SizedBox(
const SizedBox(
width: 10,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
children: const [
Text(
"Ralph Edwards",
style: TextStyle(
Expand All @@ -66,7 +66,7 @@ class SecondCard extends StatelessWidget {
),
),
SizedBox(
width: MediaQuery.of(context).size.width / 2.4,
width: (MediaQuery.of(context).size.width / 2.4),
child: Image.asset(
'assets/card_image/cardo.png',
fit: BoxFit.cover,
Expand Down
47 changes: 26 additions & 21 deletions lib/ui_components/cards/All Cards/blog_card_dark_mode/card_6.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,53 @@ class SixthCard extends StatelessWidget {

@override
Widget build(BuildContext context) {
return Card(
child: Row(
return SizedBox(
width: MediaQuery.of(context).size.width,

child:Flexible(child:Card(

child: Expanded(child:Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
color: Colors.black,
padding: const EdgeInsets.only(left: 5, top: 2, bottom: 2),
height: (MediaQuery.of(context).size.width / 2.4) * 0.83,
width: MediaQuery.of(context).size.width -
MediaQuery.of(context).size.width / 2.4 -
8,
child: const Column(
padding: const EdgeInsets.only(left: 5, top: 2, bottom: 2, right: 5),
width: MediaQuery.of(context).size.width - MediaQuery.of(context).size.width / 2.4 - 32,

child: Flexible(child:Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(
const Text(
"Politics",
style: TextStyle(fontSize: 10, color: Colors.grey),
),
Text(
const Text(
"EU funds won't be conditional upon European Values",
style: TextStyle(
fontSize: 12,
color: Colors.cyan,
fontWeight: FontWeight.w500,),
),
Text(
const Flexible(flex: 2,child:Text(
"The European Union (EU) is a political and economic union of 27 European countries. It aims to promote cooperation",
style: TextStyle(fontSize: 10, color: Colors.grey),
),
style: TextStyle(fontSize: 10, color: Colors.grey, overflow: TextOverflow.visible),
),),
FittedBox(
fit: BoxFit.fitHeight,
fit: BoxFit.cover,
child: Row(
children: [
CircleAvatar(
const CircleAvatar(
radius: 15,
),
SizedBox(
const SizedBox(
width: 10,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
children: const [
Text(
"Ralph Edwards",
style: TextStyle(
Expand All @@ -65,16 +70,16 @@ class SixthCard extends StatelessWidget {
)
],
),
),
),),
SizedBox(
width: MediaQuery.of(context).size.width / 2.4,
child: Image.asset(
'assets/card_image/cardo.png',
'assets/card_image/cardo.png' ,
fit: BoxFit.cover,
),
),
],
),
);
))));
}
}
Loading