Anonymous
Удалить заполнение строк на флаттере
Сообщение
Anonymous » 17 июл 2024, 16:10
Здравствуйте, я новичок в разработке мобильных приложений, и меня смутило отступы, которые появляются между изображением и текстом в моем коде. в основном я пробую код, который описан на YouTube и в Интернете, и для этой проблемы я до сих пор не могу найти решение
вот мой код
Код: Выделить всё
class listBerita extends StatelessWidget {
const listBerita({super.key});
@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.all(10.0),
child: Column(
children: [
Container(
width: 336,
height: 80,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.network(
"https://loremflickr.com/320/240",
height: 80,
width: 80,
),
Padding(
padding: const EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Kategori",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w700,
color: Colors.blue,
),
),
SizedBox(height: 10),
Text(
"Lorem ipsum dolor sit.",
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w700,
// color: Colors.blue,
),
),
SizedBox(height: 5),
Text(
"Author • 23 Mei 2023",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w400,
// color: Colors.blue,
),
),
],
)),
])),
],
),
);
}
}
я ожидаю, что текст переместится влево, ближе к изображению
Подробнее здесь:
https://stackoverflow.com/questions/769 ... on-flutter
1721221809
Anonymous
Здравствуйте, я новичок в разработке мобильных приложений, и меня смутило отступы, которые появляются между изображением и текстом в моем коде. в основном я пробую код, который описан на YouTube и в Интернете, и для этой проблемы я до сих пор не могу найти решение вот мой код [code]class listBerita extends StatelessWidget { const listBerita({super.key}); @override Widget build(BuildContext context) { return Padding( padding: EdgeInsets.all(10.0), child: Column( children: [ Container( width: 336, height: 80, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(10), ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Image.network( "https://loremflickr.com/320/240", height: 80, width: 80, ), Padding( padding: const EdgeInsets.all(5), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "Kategori", style: TextStyle( fontSize: 12, fontWeight: FontWeight.w700, color: Colors.blue, ), ), SizedBox(height: 10), Text( "Lorem ipsum dolor sit.", style: TextStyle( fontSize: 16, fontWeight: FontWeight.w700, // color: Colors.blue, ), ), SizedBox(height: 5), Text( "Author • 23 Mei 2023", style: TextStyle( fontSize: 12, fontWeight: FontWeight.w400, // color: Colors.blue, ), ), ], )), ])), ], ), ); } } [/code] я ожидаю, что текст переместится влево, ближе к изображению Подробнее здесь: [url]https://stackoverflow.com/questions/76943937/remove-row-padding-on-flutter[/url]