|
|
|
@ -5,7 +5,10 @@ import 'package:google_fonts/google_fonts.dart';
|
|
|
|
|
|
|
|
|
|
class PostButtonComponent extends StatefulWidget {
|
|
|
|
|
final bool empty;
|
|
|
|
|
const PostButtonComponent({Key? key, required this.empty}) : super(key: key);
|
|
|
|
|
final Function callback;
|
|
|
|
|
const PostButtonComponent(
|
|
|
|
|
{Key? key, required this.empty, required this.callback})
|
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
State<PostButtonComponent> createState() => _PostButtonComponentState();
|
|
|
|
@ -67,86 +70,93 @@ class _PostButtonComponentState extends State<PostButtonComponent>
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
return Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: 90,
|
|
|
|
|
clipBehavior: Clip.hardEdge,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.transparent, borderRadius: BorderRadius.circular(1000)),
|
|
|
|
|
child: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
AnimatedBuilder(
|
|
|
|
|
animation: _controller,
|
|
|
|
|
builder: (context, child) {
|
|
|
|
|
return Transform.translate(
|
|
|
|
|
offset: Offset(
|
|
|
|
|
_controller.value * (MediaQuery.of(context).size.width - 200),
|
|
|
|
|
0,
|
|
|
|
|
return GestureDetector(
|
|
|
|
|
onTap: () {
|
|
|
|
|
widget.callback();
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: 90,
|
|
|
|
|
clipBehavior: Clip.hardEdge,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.transparent,
|
|
|
|
|
borderRadius: BorderRadius.circular(1000)),
|
|
|
|
|
child: Stack(
|
|
|
|
|
children: [
|
|
|
|
|
AnimatedBuilder(
|
|
|
|
|
animation: _controller,
|
|
|
|
|
builder: (context, child) {
|
|
|
|
|
return Transform.translate(
|
|
|
|
|
offset: Offset(
|
|
|
|
|
_controller.value *
|
|
|
|
|
(MediaQuery.of(context).size.width - 200),
|
|
|
|
|
0,
|
|
|
|
|
),
|
|
|
|
|
child: child,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
width: 120,
|
|
|
|
|
height: 80,
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
gradient: LinearGradient(colors: [
|
|
|
|
|
Color(0xFF9E78FF).withOpacity(0.0),
|
|
|
|
|
Color(0xFFFDFDFF),
|
|
|
|
|
Color(0xFFFFFFFF),
|
|
|
|
|
Color(0xFF9E78FF).withOpacity(0.0)
|
|
|
|
|
], stops: const [
|
|
|
|
|
0,
|
|
|
|
|
0.4,
|
|
|
|
|
0.5,
|
|
|
|
|
1
|
|
|
|
|
]),
|
|
|
|
|
),
|
|
|
|
|
child: child,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
width: 120,
|
|
|
|
|
height: 80,
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
gradient: LinearGradient(colors: [
|
|
|
|
|
Color(0xFF9E78FF).withOpacity(0.0),
|
|
|
|
|
Color(0xFFFDFDFF),
|
|
|
|
|
Color(0xFFFFFFFF),
|
|
|
|
|
Color(0xFF9E78FF).withOpacity(0.0)
|
|
|
|
|
], stops: const [
|
|
|
|
|
0,
|
|
|
|
|
0.4,
|
|
|
|
|
0.5,
|
|
|
|
|
1
|
|
|
|
|
]),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
BackdropFilter(
|
|
|
|
|
filter: ImageFilter.blur(
|
|
|
|
|
sigmaX: 10.0,
|
|
|
|
|
sigmaY: 10.0,
|
|
|
|
|
),
|
|
|
|
|
child: Opacity(
|
|
|
|
|
opacity: 0.9,
|
|
|
|
|
child: Container(
|
|
|
|
|
constraints: BoxConstraints(maxWidth: 400),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
gradient: LinearGradient(colors: [
|
|
|
|
|
Color(0xFF633AF4),
|
|
|
|
|
Color(0xFF9367FF),
|
|
|
|
|
Color(0xFF633AF4)
|
|
|
|
|
]),
|
|
|
|
|
border: Border.all(width: 5, color: Color(0xFF1C1C1C)),
|
|
|
|
|
borderRadius: BorderRadius.circular(10000)),
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 25),
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.only(left: 100),
|
|
|
|
|
child: Text(
|
|
|
|
|
"Publier la capsule",
|
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontStyle: FontStyle.italic,
|
|
|
|
|
fontSize: 22),
|
|
|
|
|
BackdropFilter(
|
|
|
|
|
filter: ImageFilter.blur(
|
|
|
|
|
sigmaX: 10.0,
|
|
|
|
|
sigmaY: 10.0,
|
|
|
|
|
),
|
|
|
|
|
child: Opacity(
|
|
|
|
|
opacity: 0.9,
|
|
|
|
|
child: Container(
|
|
|
|
|
constraints: BoxConstraints(maxWidth: 400),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
gradient: LinearGradient(colors: [
|
|
|
|
|
Color(0xFF633AF4),
|
|
|
|
|
Color(0xFF9367FF),
|
|
|
|
|
Color(0xFF633AF4)
|
|
|
|
|
]),
|
|
|
|
|
border: Border.all(width: 5, color: Color(0xFF1C1C1C)),
|
|
|
|
|
borderRadius: BorderRadius.circular(10000)),
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 25),
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.only(left: 100),
|
|
|
|
|
child: Text(
|
|
|
|
|
"Publier la capsule",
|
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontStyle: FontStyle.italic,
|
|
|
|
|
fontSize: 22),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
ClipOval(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.only(left: 5, top: 5),
|
|
|
|
|
child: Image(
|
|
|
|
|
image: AssetImage("assets/images/rocket_button.png"),
|
|
|
|
|
height: 65,
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
ClipOval(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.only(left: 5, top: 5),
|
|
|
|
|
child: Image(
|
|
|
|
|
image: AssetImage("assets/images/rocket_button.png"),
|
|
|
|
|
height: 65,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|