You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
138 lines
4.9 KiB
138 lines
4.9 KiB
3 years ago
|
import 'dart:typed_data';
|
||
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
buildCommentTile(BuildContext context, bool available, Uint8List bytes,
|
||
|
TextEditingController controller) {
|
||
|
return Container(
|
||
|
width: MediaQuery.of(context).size.width,
|
||
|
height: 170,
|
||
|
margin: EdgeInsets.only(bottom: 20),
|
||
|
decoration: BoxDecoration(
|
||
|
borderRadius: BorderRadius.circular(30.0),
|
||
|
),
|
||
|
child: ClipRRect(
|
||
|
borderRadius: BorderRadius.only(
|
||
|
topLeft: Radius.circular(30.0),
|
||
|
topRight: Radius.circular(30.0),
|
||
|
bottomLeft: Radius.circular(30),
|
||
|
bottomRight: Radius.circular(30),
|
||
|
),
|
||
|
child: Material(
|
||
|
elevation: 50.0,
|
||
|
borderRadius: BorderRadius.circular(12.0),
|
||
|
child: InkWell(
|
||
|
onTap: () {
|
||
|
// Navigator.push(
|
||
|
// context,
|
||
|
// PageTransition(
|
||
|
// type: PageTransitionType.rightToLeft,
|
||
|
// child: CommentSection(),
|
||
|
// ),
|
||
|
// );
|
||
|
},
|
||
|
child: Column(
|
||
|
children: [
|
||
|
Container(
|
||
|
margin: EdgeInsets.only(top: 10),
|
||
|
height: 30,
|
||
|
width: double.infinity,
|
||
|
child: Center(
|
||
|
child: Text(
|
||
|
"Comments",
|
||
|
style: TextStyle(
|
||
|
fontSize: 16,
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
Divider(),
|
||
|
Container(
|
||
|
padding: EdgeInsets.symmetric(horizontal: 10),
|
||
|
width: double.infinity,
|
||
|
child: Text("Love this post ? Say something!")),
|
||
|
GestureDetector(
|
||
|
onTap: () => print("hello"),
|
||
|
child: Container(
|
||
|
padding: EdgeInsets.symmetric(
|
||
|
vertical: 08,
|
||
|
horizontal: 6,
|
||
|
),
|
||
|
width: MediaQuery.of(context).size.width,
|
||
|
child: Row(
|
||
|
children: [
|
||
|
Container(
|
||
|
height: 45.0,
|
||
|
width: 50.0,
|
||
|
margin: EdgeInsets.only(right: 8),
|
||
|
decoration: new BoxDecoration(
|
||
|
shape: BoxShape.circle,
|
||
|
color: Colors.grey,
|
||
|
),
|
||
|
child: !available
|
||
|
? Center(
|
||
|
child: Text("B"),
|
||
|
)
|
||
|
: Image(
|
||
|
fit: BoxFit.fill,
|
||
|
image: MemoryImage(bytes),
|
||
|
),
|
||
|
),
|
||
|
Container(
|
||
|
width: MediaQuery.of(context).size.width * 0.55,
|
||
|
height: 50,
|
||
|
child: TextField(
|
||
|
maxLines: 2,
|
||
|
autofocus: false,
|
||
|
enabled: true,
|
||
|
textAlign: TextAlign.start,
|
||
|
controller: controller,
|
||
|
style: TextStyle(
|
||
|
color: Colors.white,
|
||
|
),
|
||
|
decoration: InputDecoration(
|
||
|
border: InputBorder.none,
|
||
|
//contentPadding: EdgeInsets.only(top: 14.0),
|
||
|
hintText: "Add a comment",
|
||
|
hintStyle: TextStyle(color: Colors.grey),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
GestureDetector(
|
||
|
onTap: () {
|
||
|
print("send comment");
|
||
|
},
|
||
|
child: Container(
|
||
|
margin: EdgeInsets.all(20),
|
||
|
height: 30,
|
||
|
width: 30,
|
||
|
decoration: BoxDecoration(
|
||
|
borderRadius: BorderRadius.circular(30.0),
|
||
|
color: Color.fromRGBO(0, 0, 0, 0.4),
|
||
|
),
|
||
|
child: ClipRRect(
|
||
|
borderRadius: BorderRadius.only(
|
||
|
topLeft: Radius.circular(30.0),
|
||
|
topRight: Radius.circular(30.0),
|
||
|
bottomLeft: Radius.circular(30),
|
||
|
bottomRight: Radius.circular(30),
|
||
|
),
|
||
|
child: Align(
|
||
|
alignment: Alignment.center,
|
||
|
child: Icon(
|
||
|
Icons.send,
|
||
|
)),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
}
|