|
|
@ -3,6 +3,8 @@ import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
|
|
|
|
import 'package:gradient_borders/box_borders/gradient_box_border.dart';
|
|
|
|
|
|
|
|
import 'package:text_scroll/text_scroll.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class PostComponent extends StatelessWidget {
|
|
|
|
class PostComponent extends StatelessWidget {
|
|
|
|
const PostComponent({Key? key}) : super(key: key);
|
|
|
|
const PostComponent({Key? key}) : super(key: key);
|
|
|
@ -57,44 +59,53 @@ class PostComponent extends StatelessWidget {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
SizedBox(height: 10),
|
|
|
|
margin: EdgeInsets.only(top: 10),
|
|
|
|
AspectRatio(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
aspectRatio: 1 / 1,
|
|
|
|
borderRadius: BorderRadius.circular(20),
|
|
|
|
child: Container(
|
|
|
|
boxShadow: const [
|
|
|
|
width: 300,
|
|
|
|
BoxShadow(
|
|
|
|
height: 300,
|
|
|
|
color: Color(0xFF3A3A3A),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
spreadRadius: 0.5,
|
|
|
|
// add border
|
|
|
|
blurRadius: 0,
|
|
|
|
border: const GradientBoxBorder(
|
|
|
|
offset: Offset(0, 0), // changes position of shadow
|
|
|
|
gradient: LinearGradient(colors: [
|
|
|
|
|
|
|
|
Colors.transparent,
|
|
|
|
|
|
|
|
Color(0xFF323232),
|
|
|
|
|
|
|
|
], begin: Alignment.topCenter, end: Alignment.bottomCenter),
|
|
|
|
|
|
|
|
width: 2.5,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
// set border radius
|
|
|
|
),
|
|
|
|
borderRadius: BorderRadius.circular(20),
|
|
|
|
child: AspectRatio(
|
|
|
|
),
|
|
|
|
aspectRatio: 1 / 1,
|
|
|
|
child: ClipRRect(
|
|
|
|
child: Padding(
|
|
|
|
borderRadius: BorderRadius.circular(18),
|
|
|
|
padding: EdgeInsets.all(1.5),
|
|
|
|
// implement image
|
|
|
|
child: ClipRRect(
|
|
|
|
child: Stack(
|
|
|
|
borderRadius: BorderRadius.circular(20),
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
child: Container(
|
|
|
|
children: [
|
|
|
|
height: 20,
|
|
|
|
Image(
|
|
|
|
width: double.infinity,
|
|
|
|
image: AssetImage("assets/images/exemple_cover.png"),
|
|
|
|
child: Stack(
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
width: double.infinity,
|
|
|
|
children: const [
|
|
|
|
|
|
|
|
Image(
|
|
|
|
|
|
|
|
image: AssetImage("assets/images/exemple_cover.png"),
|
|
|
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Image(
|
|
|
|
|
|
|
|
image: AssetImage("assets/images/shadow_post.png"),
|
|
|
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Image(
|
|
|
|
|
|
|
|
image: AssetImage("assets/images/shadow_post.png"),
|
|
|
|
|
|
|
|
fit: BoxFit.fitHeight,
|
|
|
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.all(15),
|
|
|
|
|
|
|
|
child: AutoSizeText(
|
|
|
|
|
|
|
|
'“J’écoute en boucle ce son. B2O<3”',
|
|
|
|
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
|
|
|
fontSize: 15.sp),
|
|
|
|
|
|
|
|
maxFontSize: 20,
|
|
|
|
|
|
|
|
maxLines: 1,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -102,37 +113,57 @@ class PostComponent extends StatelessWidget {
|
|
|
|
SizedBox(height: 10),
|
|
|
|
SizedBox(height: 10),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
AutoSizeText(
|
|
|
|
Flexible(
|
|
|
|
"BOOBA",
|
|
|
|
flex: 6,
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
child: TextScroll(
|
|
|
|
color: Colors.white,
|
|
|
|
"BOOBA",
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
fontSize: 26.sp),
|
|
|
|
height: 1,
|
|
|
|
maxFontSize: 30,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
fontSize: 26.sp),
|
|
|
|
|
|
|
|
mode: TextScrollMode.endless,
|
|
|
|
|
|
|
|
pauseBetween: Duration(milliseconds: 500),
|
|
|
|
|
|
|
|
velocity: Velocity(pixelsPerSecond: Offset(20, 0)),
|
|
|
|
|
|
|
|
)),
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 15.0),
|
|
|
|
padding: EdgeInsets.only(bottom: 10, right: 7, left: 7),
|
|
|
|
child: AutoSizeText(
|
|
|
|
child: ClipOval(
|
|
|
|
"A.C. Milan",
|
|
|
|
child: Container(
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
width: 5.sp,
|
|
|
|
color: Colors.white,
|
|
|
|
height: 5.sp,
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize: 16.sp),
|
|
|
|
),
|
|
|
|
maxFontSize: 20,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: AutoSizeText(
|
|
|
|
flex: 8,
|
|
|
|
"2013",
|
|
|
|
child: Padding(
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
padding: EdgeInsets.only(bottom: 2),
|
|
|
|
color: Colors.white.withOpacity(0.5),
|
|
|
|
child: TextScroll(
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
"A.C. Milan",
|
|
|
|
fontSize: 16.sp),
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
height: 1,
|
|
|
|
maxFontSize: 20,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
)
|
|
|
|
fontSize: 16.sp),
|
|
|
|
|
|
|
|
mode: TextScrollMode.endless,
|
|
|
|
|
|
|
|
velocity: Velocity(pixelsPerSecond: Offset(50, 20)),
|
|
|
|
|
|
|
|
pauseBetween: Duration(milliseconds: 500),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
Container(width: 10),
|
|
|
|
|
|
|
|
AutoSizeText(
|
|
|
|
|
|
|
|
"2013",
|
|
|
|
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
|
|
|
|
color: Colors.white.withOpacity(0.5),
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
|
|
|
fontSize: 16.sp),
|
|
|
|
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
|
|
|
|
maxFontSize: 20,
|
|
|
|
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(height: 60),
|
|
|
|
SizedBox(height: 60),
|
|
|
|