|
|
@ -214,58 +214,104 @@ class _FeedScreenState extends State<FeedScreen> with SingleTickerProviderStateM
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
return Scaffold(
|
|
|
|
resizeToAvoidBottomInset: true,
|
|
|
|
resizeToAvoidBottomInset: true,
|
|
|
|
backgroundColor: bgColor,
|
|
|
|
backgroundColor: bgColor,
|
|
|
|
extendBodyBehindAppBar: true,
|
|
|
|
extendBodyBehindAppBar: true,
|
|
|
|
body: Container(
|
|
|
|
body: displayFeed.isEmpty
|
|
|
|
width: double.infinity,
|
|
|
|
? Container(
|
|
|
|
child: Stack(
|
|
|
|
width: double.infinity,
|
|
|
|
fit: StackFit.expand,
|
|
|
|
child: Stack(
|
|
|
|
children: [
|
|
|
|
fit: StackFit.expand,
|
|
|
|
Align(
|
|
|
|
children: [
|
|
|
|
child: CircularRevealAnimation(
|
|
|
|
Container(
|
|
|
|
animation: animation,
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
centerOffset: Offset(30.w, -100),
|
|
|
|
image: DecorationImage(
|
|
|
|
child: Container(
|
|
|
|
image: AssetImage("assets/images/empty_bg.png"), fit: BoxFit.cover, opacity: 0.3),
|
|
|
|
constraints: BoxConstraints(maxWidth: 600),
|
|
|
|
),
|
|
|
|
padding: EdgeInsets.fromLTRB(defaultPadding, 100.h, defaultPadding, 0),
|
|
|
|
child: Padding(
|
|
|
|
child: ListView.builder(
|
|
|
|
padding: EdgeInsets.only(top: 140.h, left: defaultPadding),
|
|
|
|
physics: const BouncingScrollPhysics(decelerationRate: ScrollDecelerationRate.fast),
|
|
|
|
child: Column(
|
|
|
|
clipBehavior: Clip.none,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
shrinkWrap: true,
|
|
|
|
children: [
|
|
|
|
itemCount: displayFeed.length,
|
|
|
|
Text("Suis tes amis pour voir leurs capsules",
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
return Padding(
|
|
|
|
color: Colors.white, fontSize: 23, fontWeight: FontWeight.w800))
|
|
|
|
padding: const EdgeInsets.only(bottom: 40),
|
|
|
|
],
|
|
|
|
child: PostComponent(callback: openDetailPost, post: displayFeed[index], index: index),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
),
|
|
|
|
},
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
Align(
|
|
|
|
),
|
|
|
|
alignment: Alignment.topCenter,
|
|
|
|
),
|
|
|
|
child: IgnorePointer(
|
|
|
|
Align(
|
|
|
|
child: Container(
|
|
|
|
alignment: Alignment.topCenter,
|
|
|
|
height: 240.h,
|
|
|
|
child: IgnorePointer(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
child: Container(
|
|
|
|
gradient: LinearGradient(
|
|
|
|
height: 240.h,
|
|
|
|
begin: Alignment.topRight,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
stops: [0.3, 1],
|
|
|
|
gradient: LinearGradient(
|
|
|
|
colors: [bgColor.withOpacity(0.9), bgColor.withOpacity(0)])),
|
|
|
|
begin: Alignment.topRight,
|
|
|
|
),
|
|
|
|
stops: [0.3, 1],
|
|
|
|
),
|
|
|
|
colors: [bgColor.withOpacity(0.9), bgColor.withOpacity(0)])),
|
|
|
|
),
|
|
|
|
|
|
|
|
Align(
|
|
|
|
|
|
|
|
alignment: Alignment.topCenter,
|
|
|
|
|
|
|
|
child: ConstrainedBox(
|
|
|
|
|
|
|
|
constraints: BoxConstraints(maxWidth: 800),
|
|
|
|
|
|
|
|
child: TopNavBarComponent(callback: changeFeed),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
),
|
|
|
|
: Container(
|
|
|
|
Align(
|
|
|
|
width: double.infinity,
|
|
|
|
alignment: Alignment.topCenter,
|
|
|
|
child: Stack(
|
|
|
|
child: ConstrainedBox(
|
|
|
|
fit: StackFit.expand,
|
|
|
|
constraints: BoxConstraints(maxWidth: 800),
|
|
|
|
children: [
|
|
|
|
child: TopNavBarComponent(callback: changeFeed),
|
|
|
|
Align(
|
|
|
|
),
|
|
|
|
child: CircularRevealAnimation(
|
|
|
|
),
|
|
|
|
animation: animation,
|
|
|
|
],
|
|
|
|
centerOffset: Offset(30.w, -100),
|
|
|
|
),
|
|
|
|
child: Container(
|
|
|
|
),
|
|
|
|
constraints: BoxConstraints(maxWidth: 600),
|
|
|
|
);
|
|
|
|
padding: EdgeInsets.fromLTRB(defaultPadding, 100.h, defaultPadding, 0),
|
|
|
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
|
|
|
physics: const BouncingScrollPhysics(decelerationRate: ScrollDecelerationRate.fast),
|
|
|
|
|
|
|
|
clipBehavior: Clip.none,
|
|
|
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
|
|
|
itemCount: displayFeed.length,
|
|
|
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
|
|
|
return Padding(
|
|
|
|
|
|
|
|
padding: const EdgeInsets.only(bottom: 40),
|
|
|
|
|
|
|
|
child:
|
|
|
|
|
|
|
|
PostComponent(callback: openDetailPost, post: displayFeed[index], index: index),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Align(
|
|
|
|
|
|
|
|
alignment: Alignment.topCenter,
|
|
|
|
|
|
|
|
child: IgnorePointer(
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
height: 240.h,
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
gradient: LinearGradient(
|
|
|
|
|
|
|
|
begin: Alignment.topRight,
|
|
|
|
|
|
|
|
stops: [0.3, 1],
|
|
|
|
|
|
|
|
colors: [bgColor.withOpacity(0.9), bgColor.withOpacity(0)])),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Align(
|
|
|
|
|
|
|
|
alignment: Alignment.topCenter,
|
|
|
|
|
|
|
|
child: ConstrainedBox(
|
|
|
|
|
|
|
|
constraints: BoxConstraints(maxWidth: 800),
|
|
|
|
|
|
|
|
child: TopNavBarComponent(callback: changeFeed),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|