Created
September 12, 2022 06:17
-
-
Save izzygld/84c8f9352d3d56854f112883509e838b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body: SingleChildScrollView( | |
child: Column( | |
children: <Widget>[ | |
Container( | |
child: GestureDetector( | |
child: | |
Image.network( | |
postOne.imageUrl, | |
fit: BoxFit.fitWidth, | |
height: MediaQuery | |
.of(context) | |
.size | |
.width, | |
width: MediaQuery | |
.of(context) | |
.size | |
.width, | |
), | |
onLongPress: () {}, | |
onDoubleTap: () {}, | |
), | |
), | |
Expanded( | |
//height: MediaQuery.of(context).size.width*0.33, | |
child: ListView.builder( | |
itemCount: commentList.length, | |
itemBuilder: (context, position) { | |
return GestureDetector( | |
onLongPress: () {}, | |
child: Card( | |
child: Padding( | |
padding: EdgeInsets.all(5.0), | |
child: new CheckboxListTile( | |
title: new Text(commentList | |
.elementAt(position) | |
.coment, | |
style: TextStyle(fontSize: 18.0),), | |
value: values[commentList | |
.elementAt(position) | |
.coment], | |
onChanged: (bool value) {}), | |
), | |
) | |
); | |
} | |
), | |
), | |
Container( | |
child: Row( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
new Flexible( | |
child: Theme( | |
data: new ThemeData( | |
brightness: Brightness.light, | |
primarySwatch: Colors.grey, | |
inputDecorationTheme: new InputDecorationTheme( | |
labelStyle: new TextStyle( | |
color: Colors.black45, fontSize: 18.0 | |
), | |
) | |
), | |
child: new Form( | |
key: _formKey, | |
child: new TextFormField( | |
validator: (value) { | |
if (value.isEmpty) { | |
return 'Please enter the comment'; | |
} | |
}, | |
controller: commentController, | |
decoration: new InputDecoration( | |
labelText: "Add comment", | |
//hintText: 'Add comment' | |
), | |
keyboardType: TextInputType.text, | |
), | |
), | |
), | |
), | |
new Container( | |
margin: EdgeInsets.only(left: 10.0, top: 12.0), | |
child: new IconButton( | |
icon: new Icon(Icons.send, color: Colors.black,), | |
onPressed: () {} | |
) | |
), | |
]), | |
), | |
], | |
), | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I need to move screen when the keyboard is open to see what I am typing.
if i was to wrap the column:
error gets returned: