post capsule

posts_EKA-DDA
Lucas Delanier 2 years ago
parent de013faa30
commit 60ee9d2700

@ -248,7 +248,7 @@ class _EditablePostComponentState extends State<EditablePostComponent>
)), )),
Container(width: 10), Container(width: 10),
AutoSizeText( AutoSizeText(
"2013", widget.music?.date.toString() ?? "unknown",
style: GoogleFonts.plusJakartaSans( style: GoogleFonts.plusJakartaSans(
color: Colors.white.withOpacity(0.5), color: Colors.white.withOpacity(0.5),
fontWeight: FontWeight.w300, fontWeight: FontWeight.w300,

@ -81,6 +81,7 @@ class _PostButtonComponentState extends State<PostButtonComponent>
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.transparent, color: Colors.transparent,
borderRadius: BorderRadius.circular(1000)), borderRadius: BorderRadius.circular(1000)),
child: Align(
child: Stack( child: Stack(
children: [ children: [
AnimatedBuilder( AnimatedBuilder(
@ -88,8 +89,7 @@ class _PostButtonComponentState extends State<PostButtonComponent>
builder: (context, child) { builder: (context, child) {
return Transform.translate( return Transform.translate(
offset: Offset( offset: Offset(
_controller.value * 20 + _controller.value * (240),
(MediaQuery.of(context).size.width - 200),
0, 0,
), ),
child: child, child: child,
@ -129,7 +129,8 @@ class _PostButtonComponentState extends State<PostButtonComponent>
Color(0xFF9367FF), Color(0xFF9367FF),
Color(0xFF633AF4) Color(0xFF633AF4)
]), ]),
border: Border.all(width: 5, color: Color(0xFF1C1C1C)), border:
Border.all(width: 5, color: Color(0xFF1C1C1C)),
borderRadius: BorderRadius.circular(10000)), borderRadius: BorderRadius.circular(10000)),
padding: EdgeInsets.symmetric(vertical: 25), padding: EdgeInsets.symmetric(vertical: 25),
width: double.infinity, width: double.infinity,
@ -158,6 +159,7 @@ class _PostButtonComponentState extends State<PostButtonComponent>
], ],
), ),
), ),
),
); );
} }
} }

@ -94,10 +94,8 @@ class _PostScreenState extends State<PostScreen>
} }
handleSubmit() async { handleSubmit() async {
print("ccccccccccccc");
await MyApp.postViewModel.addPost( await MyApp.postViewModel.addPost(
description, (selectedMusic?.id)!, selectedImage, selectedCity); description, (selectedMusic?.id)!, selectedImage, selectedCity);
print("ccccccccccccc");
quit(); quit();
} }

@ -19,16 +19,12 @@ class PostService {
}; };
var postAdd = await MyApp.db.collection("posts").add(post); var postAdd = await MyApp.db.collection("posts").add(post);
print("cc");
if (image != null) { if (image != null) {
print("cc3");
var imageRef = FirebaseStorage.instance.ref('$id${postAdd.id}.jpg'); var imageRef = FirebaseStorage.instance.ref('$id${postAdd.id}.jpg');
await imageRef.putFile(image); await imageRef.putFile(image);
var imageUrl = await imageRef.getDownloadURL(); var imageUrl = await imageRef.getDownloadURL();
print(imageUrl);
postAdd.update({"selfie": imageUrl}); postAdd.update({"selfie": imageUrl});
} }
print("cc2");
} }
deletePost() {} deletePost() {}

Loading…
Cancel
Save