import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class APage extends StatelessWidget {
APage();
@override
Widget build(BuildContext context) {
print("APage");
return Scaffold(
appBar: _appbar(),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: ListView.separated(
itemBuilder: (context, index) {
return Row(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(10),
child: Image.network(
"<https://picsum.photos/id/200/100/100>",
fit: BoxFit.cover,
),
),
SizedBox(width: 16),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("니트 조끼"),
Text("좌동 2시간 전"),
Text("35,000"),
Row(
children: [
Spacer(),
Icon(CupertinoIcons.chat_bubble_2),
SizedBox(width: 2),
Text("5"),
SizedBox(width: 4),
Icon(CupertinoIcons.heart),
SizedBox(width: 2),
Text("10"),
],
),
],
),
),
],
);
},
separatorBuilder: (context, index) => Divider(),
itemCount: 20,
),
),
);
}
AppBar _appbar() {
return AppBar(
title: const Row(
children: [
Text("좌동"),
Icon(CupertinoIcons.chevron_down),
],
),
actions: [
IconButton(onPressed: () {}, icon: const Icon(CupertinoIcons.search)),
IconButton(
onPressed: () {}, icon: const Icon(CupertinoIcons.list_dash)),
IconButton(onPressed: () {}, icon: const Icon(CupertinoIcons.bell)),
],
bottom: const PreferredSize(
preferredSize: Size.fromHeight(0.5),
child: Divider(),
),
);
}
}