Untitled
unknown
dart
a year ago
5.9 kB
4
Indexable
import 'package:base_architecture/presentation/resources/color_manager.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class PostsPage extends StatefulWidget {
const PostsPage({super.key});
@override
State<PostsPage> createState() => _PostsPageState();
}
class _PostsPageState extends State<PostsPage> {
@override
Widget build(BuildContext context) {
String x = '';
return Scaffold(
appBar: AppBar(),
body: Column(
children: [
Container(
padding: EdgeInsets.symmetric(horizontal: 12),
margin: EdgeInsets.symmetric(horizontal: 20),
decoration: BoxDecoration(
border: Border.all(color: HexColor.fromHex('#21AFAE')),
borderRadius: BorderRadius.all(Radius.circular(12)),
color: HexColor.fromHex('#21AFAE').withOpacity(0.2),
),
child: ListTile(
minLeadingWidth: 2,
contentPadding: EdgeInsets.zero,
leading: CircleAvatar(
radius: 11,
),
title: Text(
'إضافة منشور جديد',
style: TextStyle(color: HexColor.fromHex('#818CA2')),
),
trailing: TextButton(
onPressed: () {},
child: Text(
'نشر المنشور',
style: TextStyle(color: HexColor.fromHex('#21AFAE')),
),
),
),
),
Expanded(
child: ListView.builder(
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 8),
itemCount: 2,
itemBuilder: (context, index) => Container(
padding: EdgeInsets.symmetric(
horizontal: 12,
vertical: 12,
),
margin: EdgeInsets.symmetric(vertical: 8),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(12)),
border: Border.all(
color: Colors.grey.shade200,
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
//user name and date
ListTile(
minLeadingWidth: 2,
contentPadding: EdgeInsets.zero,
leading: CircleAvatar(
radius: 11,
),
title: Text('محمد علي صالح'),
trailing: Text('منذ ٢ ساعة'),
),
//post text
Text(
'هو ببساطة نص شكلي (بمعنى أن الغاية هي الشكل وليس المحتوى) ويُستخدم في صناعات المطابع ودور النشر في صناعات المطابع ودور النشر...',
),
//post media
//user interactions
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
IconButton(
padding: EdgeInsets.symmetric(horizontal: 4),
constraints: BoxConstraints(),
onPressed: () {},
icon: SvgPicture.asset('assets/svg/like.svg'),
),
IconButton(
padding: EdgeInsets.symmetric(horizontal: 4),
constraints: BoxConstraints(),
onPressed: () {},
icon: SvgPicture.asset('assets/svg/comment.svg'),
),
IconButton(
padding: EdgeInsets.symmetric(horizontal: 4),
constraints: BoxConstraints(),
onPressed: () {},
icon: SvgPicture.asset('assets/svg/repeat.svg'),
),
IconButton(
padding: EdgeInsets.symmetric(horizontal: 4),
constraints: BoxConstraints(),
onPressed: () {},
icon: SvgPicture.asset('assets/svg/share.svg'),
),
],
),
Row(
children: [
Text(
'140 إعجاب',
style: TextStyle(
fontSize: 10,
),
),
SizedBox(width: 8),
Text(
'30 مشاركة',
style: TextStyle(
fontSize: 10,
),
),
SizedBox(width: 8),
Text(
'2 تعليق',
style: TextStyle(
fontSize: 10,
),
),
],
),
],
),
],
),
),
),
),
],
),
);
}
}
Editor is loading...
Leave a Comment