How to add space between keyboard and focused TextField in flutter? - flutter

I have this problem with scrolling, when I focus the text field the red container covers the Textfield, where i want to write.
How can I control the scrolling, so that the Textfield shows above the red container?
I want to show the red Container above the keabord, and when the user writes in the Textfield I want to activate the nect button.
enter image description here
enter image description here
class MyHomePage extends StatefulWidget {
MyHomePage({Key key}) : super(key: key);
#override
_MyHomePageState createState() => new _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
FocusNode _focusNode = new FocusNode();
#override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text("Focus Example"),
),
body: Stack(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Expanded(
flex: 9, // 90% of space => (6/(6 + 4))
child: LayoutBuilder(
builder: (context, constraint) {
return SingleChildScrollView(
child: ConstrainedBox(
constraints:
BoxConstraints(minHeight: constraint.maxHeight),
child: IntrinsicHeight(
child: Column(
children: <Widget>[
new Container(
height: 800.0,
color: Colors.blue.shade200),
new TextFormField(
focusNode: _focusNode,
decoration: new InputDecoration(
hintText: 'Focus me!',
),
),
new Container(
height: 800.0,
color: Colors.blue.shade200),
],
),
),
),
);
},
)),
Expanded(
flex: 1, // 10% of space
child: Container(
color: Colors.purple,
alignment: Alignment.center,
),
),
],
),
Align(
alignment: Alignment.bottomCenter,
child: Container(
padding: EdgeInsets.only(left: 10.0, right: 10.0),
height: 60,
color: Colors.red,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
GestureDetector(
child: Text("Back",
style:
TextStyle(color: Colors.white, fontSize: 18.0)),
onTap: () {}),
Container(
width: 40,
height: 40,
child: FlatButton(
textColor: Colors.white,
disabledColor: Colors.grey,
disabledTextColor: Colors.white70,
padding: EdgeInsets.only(top: 0.0, bottom: 0.0),
splashColor: Colors.white,
onPressed: () {},
child: Icon(
Icons.navigate_next,
size: 35,
),
),
)
],
),
),
)
],
));
}
}

I could give you an idea. Try something like this,
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
height: MediaQuery.of(context).size.height * 0.9 - 60,
child: Row( ..... ), // Include SingleChildScrollView too
),
Container(
padding: EdgeInsets.only(left: 10.0, right: 10.0),
height: 60,
child: Row( ... )
)
]
Hope that solves your issue.

Related

Flutter Transform Positioned widget Left to Right when i click the button and make it visible?

What i need?
I have two Positioned Widget inside of the Stack Widget. Once i click the TextButton i'd like to transform one positioned widget right to left and display another invisible widget on the screen.
Also once i click the another TextButton it should be like in the initial view.
I have tried what have described in this video but couldn't work.
https://www.youtube.com/watch?v=FCyoHclCqc8
Details in the below code
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class HomeScreen extends StatelessWidget {
#override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
FormLogin(),
],
));
}
}
class FormLogin extends StatefulWidget {
const FormLogin({
Key key,
}) : super(key: key);
#override
_FormLoginState createState() => _FormLoginState();
}
class _FormLoginState extends State<FormLogin>
with SingleTickerProviderStateMixin {
static AnimationController controller;
#override
Widget build(BuildContext context) {
return Flexible(
flex: 2,
child: Stack(
children: <Widget>[
Container(height: MediaQuery.of(context).size.height),
Container(
height: MediaQuery.of(context).size.height / 2.5,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Color(0xFFbe8696), Color(0xFFbe8996)],
),
),
),
// Logo Section -> I don't want to transform this section i want to keep it on screen.
Positioned(
top: MediaQuery.of(context).size.height / 6,
left: MediaQuery.of(context).size.width / 3.8,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.network(
"https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Google-flutter-logo.png/799px-Google-flutter-logo.png",
scale: 4,
),
],
),
),
// Login Screen - I would like to transfer this Positioned Widget through
// X axis to left and make it invisible, When I click the below TextButton.
Positioned(
top: 200,
child: Container(
height: MediaQuery.of(context).size.height / 2,
width: MediaQuery.of(context).size.width,
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0),
),
margin: EdgeInsets.all(20.0),
elevation: 0.7,
child: Padding(
padding: const EdgeInsets.only(
left: 16, right: 16, top: 8, bottom: 4),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Center(
child: Wrap(
runAlignment: WrapAlignment.center,
crossAxisAlignment: WrapCrossAlignment.center,
children: [
TextButton(
// When I click that button.
onPressed: () {},
child: Text(
"Signup",
style: GoogleFonts.montserrat(
fontWeight: FontWeight.w400,
fontSize: 14.0,
color: Colors.black,
),
),
)
],
),
),
],
)),
))),
// Register Screen - Once user click the above button,
// at the same time this widget should be visible.
Positioned(
top: 250,
// This widget invisible now. Make "left: 0" to display widget.
left: 0,
height: MediaQuery.of(context).size.height / 2,
child: Container(
width: MediaQuery.of(context).size.width,
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0),
),
margin: EdgeInsets.all(20.0),
elevation: 0.7,
child: Padding(
padding: const EdgeInsets.only(
left: 16, right: 16, top: 8, bottom: 4),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Center(
child: Wrap(
runAlignment: WrapAlignment.center,
crossAxisAlignment: WrapCrossAlignment.center,
children: [
TextButton(
//**I would like to return initial position once i click that button.**
onPressed: () {},
child: Text(
"Return Back",
style: GoogleFonts.montserrat(
fontWeight: FontWeight.w400,
fontSize: 14.0,
color: Colors.black,
),
),
)
],
),
),
],
)),
)))
],
),
);
}
}

Bouncing containers in Listview in flutter

I know enable a button to bounce on tap but the problem i am facing is that i want to implement this on a listview containing containers but i am unable to do it.There are only questions regarding a single button like here https://pub.dev/packages/bouncing_widget but not for whole list of buttons/containers or so. I tried the above link package but it is also causing other issues like the list is not scrolling , and sometimes it is not working at all, Please help
class MyApp extends StatelessWidget {
#override
Widget build(BuildContext context) {
return MaterialApp(
home: HomePage()
);
}
}
class HomePage extends StatefulWidget {
#override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> with SingleTickerProviderStateMixin{
AnimationController animationController;
double _scale;
#override
void initState(){
animationController=AnimationController(vsync: this,duration: Duration(milliseconds: 500),
lowerBound: 0.0,upperBound: 0.2);
animationController.addListener(() {
setState(() {
});
});
super.initState();
}
void Ontapdown(TapDownDetails details){
animationController.forward();
}
void Ontapup(TapUpDetails details){
animationController.reverse();
}
bool lights=false;
int count1=0;
int count2=0;
#override
Widget build(BuildContext context) {
_scale =1-animationController.value;
return Scaffold(
appBar: AppBar(
title: Text("Quickier"),
centerTitle: true,
backgroundColor: Colors.indigo,
),
body: Container(
height: 250,
margin: EdgeInsets.fromLTRB(10, 10, 5, 10),
child: ListView(
scrollDirection: Axis.horizontal,
physics: BouncingScrollPhysics(),
children: <Widget>[
GestureDetector(
onTap: (){
Navigator.push(context,MaterialPageRoute(builder:
(context)=> camerapp()));
},
child: Container(
margin: EdgeInsets.fromLTRB(5, 0, 5, 0),
height: 100,
width: 200,
decoration: BoxDecoration(
color: Colors.grey[700],
borderRadius: BorderRadius.all(Radius.circular(10),)
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
Icons.camera_alt,
color: Colors.black,
size: 70,
),
SizedBox(height: 20.0),
Text(
"Camera",
style: TextStyle(
fontSize: 20.0,
color: Colors.black
),
)
],
)
),
),
GestureDetector(
onTap: (){
setState(() {
if(count1%2==1){
lights=false;
Flashlight.lightOff();}
else{
lights=true;
Flashlight.lightOn();
}
count1+=1;
});
},
child: Container(
margin: EdgeInsets.fromLTRB(5, 0, 5, 0),
height: 100,
width: 200,
padding: EdgeInsets.symmetric(vertical: 20.0,horizontal: 20.0),
decoration: BoxDecoration(
color: Colors.teal[300],
borderRadius: BorderRadius.all(Radius.circular(10),)
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
Icons.highlight,
color: lights ? Colors.yellow.shade600 : Colors.black,
size: 70,
),
SizedBox(height: 20.0),
Text(
"Flashlight",
style: TextStyle(
fontSize: 20.0,
color: Colors.black
),
)
],
)
),
),
GestureDetector(
onTap: (){
HapticFeedback.lightImpact();
},
onTapDown: Ontapdown,
onTapUp: Ontapup,
child: Transform.scale(
scale: _scale,
child: Container(
margin: EdgeInsets.fromLTRB(5, 0, 5, 0),
height: 100,
width: 200,
decoration: BoxDecoration(
color: Colors.teal[400],
borderRadius: BorderRadius.all(Radius.circular(10),)
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
Icons.vibration,
color: Colors.black,
size: 70,
),
SizedBox(height: 20.0),
Text(
"Vibration",
style: TextStyle(
fontSize: 20.0,
color: Colors.black
),
)
],
)
),
),
),
Container(
margin: EdgeInsets.fromLTRB(5, 0, 5, 0),
height: 100,
width: 200,
decoration: BoxDecoration(
color: Colors.teal[500],
borderRadius: BorderRadius.all(Radius.circular(10),)
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
Icons.settings,
color: Colors.black,
size: 70,
),
SizedBox(height: 20.0),
Text(
"Settings",
style: TextStyle(
fontSize: 20.0,
color: Colors.black
),
)
],
)
)
],
),
)
);
}
}
I have enable it on one container i.e. third the vibration one but when i apply ontapup and ontapdown on other's GestureDetectors very different things happen like if i click any one of the containers all are bouncing at the same time,type......
so, please tell me what I should do or if there is any other approach it will be helpful as I'm only a beginner.
Any other suggestions will be grateful too.

How to change the text in first screen when there is any change in third screen using provider package in flutter?

I have a firstscreen called including stateful widget, PlantFeatureScreen1 where I have to show the change when the update occurs in thirdscreen which also includes a stateful widget, CartDetais3.
How can i update the first screen when changes happens in third screen and addQuantity and subtractQuantity functions will be added in third screen? Please suggest using provider package.
firstScreen code Here I have to show the change in very last center widget of this widget tree.
class PlantFeatureScreen1 extends StatefulWidget {
#override
_PlantFeatureScreen1State createState() => _PlantFeatureScreen1State();
}
class _PlantFeatureScreen1State extends State<PlantFeatureScreen1> {
#override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
TopAppBar(),
Expanded(
flex: 1,
child: Align(
alignment: Alignment(-1, 0),
child: Container(
decoration: BoxDecoration(
color: Colors.white,
),
child: Text(
"Plants",
style: TextStyle(fontSize: 30, fontWeight: FontWeight.w700),
),
),
),
),
Expanded(
flex: 5,
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: Colors.blue,
),
child: DefaultTabController(
length: 5,
child: Column(
children: [
Container(
height: 50,
width: double.infinity,
child: TabBar(
isScrollable: true,
tabs: ourAllLists.tabMaker(),
),
),
Container(
height: 317,
width: double.infinity,
decoration: BoxDecoration(color: Colors.white),
child: TabBarView(
children: ourAllLists.tabViewerMaker(context),),),
],
),
),
),
),
Padding(
padding: const EdgeInsets.fromLTRB(20, 0, 20, 20),
child: Container(
alignment: Alignment.bottomRight,
height: 120,
width: double.infinity,
child: Stack(
overflow: Overflow.visible,
children: [
Container(
height: 70,
width: 105,
decoration: BoxDecoration(
color: Color(0xFF96CA2D),
borderRadius: BorderRadiusDirectional.horizontal(
end: Radius.circular(32),
start: Radius.circular(32))),
child: Icon(FontAwesomeIcons.shoppingBag,color:Colors.white,size:30),
),
Positioned(
// top: 0,
bottom: 50,
right: 0,
child: Container(
height: 35,
width: 35,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(50),
border: Border.all(color: Color(0xFF96CA2D),width: 4)
),
child: Center(child: Text(ourAllLists.totalquantity().toString(),style:TextStyle(fontSize: 20,color: Color(0xFF96CA2D)))),
),
)
],
),
),
)
],
);
}
}
thirdScreen code Here the update happens when the + or - icons get clicked.
class CartDetais3 extends StatefulWidget {
#override
_CartDetais3State createState() => _CartDetais3State();
}
class _CartDetais3State extends State<CartDetais3> {
#override
Widget build(BuildContext context) {
return MaterialApp(
home: SafeArea(
child: Scaffold(
body: Padding(
padding: const EdgeInsets.fromLTRB(8, 20, 8, 15),
child: Column(
children: [
TopAppBar(),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"Cart",
style: kPlantNameStyle,
),
Text(
"\$" + "284",
style: kItemPrice,
),
],
),
Expanded(
child: ListView.builder(
itemCount: OurAllLists.cartPlantList3.length,
itemBuilder: (context, index) {
return Card(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
height: 110,
width: 100,
child: Image(image: AssetImage("assets/tulip.png")),
),
Container(
height: 80,
width: 120,
child: Column(
children: [
Text(OurAllLists.cartPlantList3[index].pN),
Text(OurAllLists.cartPlantList3[index].ca
.toUpperCase()),
Text("\$ " +
OurAllLists.cartPlantList3[index].pr
.toString()),
],
),
),
Container(
height: 120,
child: Column(
children: [
FlatButton(
onPressed: () {
setState(() {
*here addQuantity function must go*
});
},
child: Icon(
FontAwesomeIcons.plus,
size: 20,
),
),
Text(OurAllLists.cartPlantList3[index].qu
.toString()),
FlatButton(
onPressed: () {
*here subtractQuantity function must go*
},
child: Icon(
FontAwesomeIcons.minus,
size: 20,
),
),
],
))
],
),
);
}),
)
],
),
),
)));
}
}
I have a also a seperate class called ViewTotallItemProvider
class ViewTotalItemProvider extends ChangeNotifier{
addQuantity(index){
OurAllLists.cartPlantList3[index].qu++;
notifyListeners();
}
subtrachQuantity(index){
OurAllLists.cartPlantList3[index].qu--;
}
}

Flutter showBottomModalPopup height is not extending more than 50% of the screen size

I am trying to use the showBottomModalPopup but I can't seem to get it extended more than 50 % of the screen even tho I am using the the context of the screen to set the height.
Can anyone please spot what I am doing wrong
I am trying to set it to 80%
This the showBottomModal function
void _tripShowModalBottomSheet(context) {
showModalBottomSheet(context: context, builder: (BuildContext bc) {
return Container(
height: MediaQuery.of(context).size.height * .80,
color: Colors.white,
child: Text('this is your first showBottomModal')
);
});
}
I am calling it from here
onLongPress: () => {
_tripShowModalBottomSheet(context)
},
full code if needed
import 'package:flutter/material.dart';
class TransportMenuBody extends StatelessWidget {
const TransportMenuBody({Key key}) : super(key: key);
void _tripShowModalBottomSheet(context) {
showModalBottomSheet(context: context, builder: (BuildContext bc) {
return Container(
height: MediaQuery.of(context).size.height * 30,
color: Colors.white,
child: Text('this is your first showBottomModal')
);
});
}
#override
Widget build(BuildContext context) {
return
ListView(children: <Widget>[
Container(
padding: EdgeInsets.symmetric(vertical: 20.0, horizontal: 10.0),
alignment: Alignment.topLeft,
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
alignment: Alignment.topLeft,
margin: EdgeInsets.only(bottom: 10.0),
child: Text('Kigali', style: TextStyle(fontSize: 20, fontWeight: FontWeight.w400, color: Colors.black),),
),
InkWell(
onLongPress: () => {
_tripShowModalBottomSheet(context) // calling the function from here
},
onTap: () => {},
child: Container(
color: Colors.white,
width: MediaQuery.of(context).size.width * 1,
padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 10.0),
child: Container(
child: Container(
child: Column(
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(child: Text('201', style: TextStyle(fontSize: 24.0, fontWeight: FontWeight.w600))),
Container(
alignment: Alignment.topLeft,
child: Text('20 active buses', style: TextStyle(color: Color(0xFFd9d9d9)),),),
],),
Row(
children: <Widget>[
Container(
alignment: Alignment.topLeft,
child: Text('Kicukiro(saint-joseph) - Down town'),),
],),
const Divider(
color: Color(0xFFD9D9D9),
thickness: .5,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(child: Text('201', style: TextStyle(fontSize: 24.0, fontWeight: FontWeight.w600))),
Container(
alignment: Alignment.topLeft,
child: Text('20 active buses', style: TextStyle(color: Color(0xFFd9d9d9)),),),
],),
Row(
children: <Widget>[
Container(
alignment: Alignment.topLeft,
child: Text('Kicukiro(saint-joseph) - Down town'),),
],),
const Divider(
color: Color(0xFFD9D9D9),
thickness: .5,
),
],)
)
)
),
),
],
)
),
Text('data'),
],
);
}
}
Well I am not sure if bottomSheetModal can gain height but if you want a bottom sheet with rich customization you can also use DraggableScrollableSheet which is scrollable by default with nice animation DraggableScrollableSheet you can check this here https://api.flutter.dev/flutter/widgets/DraggableScrollableSheet-class.html

Wrap text in container without using a fixed width in Flutter

I'm trying to create a basic chat application in Flutter and I want to display the conversation in simple containers which will adapt its length to the text inside. Everything works fine until the text does not fit the length of the container, when I get an overflow error.
The code that I'm using is this one
Widget _buildMessage(Message message) {
return Row(children: <Widget>[
message.author == username ? Expanded(child: Container()) : Container(),
Container(
padding: EdgeInsets.all(8.0),
margin: EdgeInsets.all(4.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8.0))),
child: Row(
children: <Widget>[
Text(
message.text,
),
SizedBox(
width: 8.0,
),
Padding(
padding: EdgeInsets.only(top: 6.0),
child: Text(
message.time,
style: TextStyle(fontSize: 10.0, color: Colors.grey),
),
),
SizedBox(
width: 8.0,
),
Padding(
padding: EdgeInsets.only(top: 6.0),
child: Text(
message.author,
style: TextStyle(fontSize: 10.0, color: Colors.grey),
),
),
],
)),
message.author != username ? Expanded(child: Container()) : Container(),
]);
}
I'm using a Row within a Row so that I can get this alignment to the right or to the left depending on the author.
If I type something with a multiline in my input, the text is rendered properly, with the container expanding vertically as needed. The problem is when I just type beyond the width of the container.
I can fix this by wrapping the Text with a Container and a fixed with, but I don't want that as I want the width to be dynamic and adapt to the text.
I've seen other questions where people suggests using Flexible or Expanded, but I can't figure out how to do it.
Any ideas would be appreciated.
I tried to edit your code and here is what I've made:
return Row(
mainAxisAlignment: message.author == username ? MainAxisAlignment.end : MainAxisAlignment.start,
//this will determine if the message should be displayed left or right
children: [
Flexible(
//Wrapping the container with flexible widget
child: Container(
padding: EdgeInsets.all(8.0),
margin: EdgeInsets.all(4.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8.0))),
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Flexible(
//We only want to wrap the text message with flexible widget
child: Container(
child: Text(
message.text,
)
)
),
SizedBox(
width: 8.0,
),
Padding(
padding: EdgeInsets.only(top: 6.0),
child: Text(
message.time,
style: TextStyle(fontSize: 10.0, color: Colors.grey),
),
),
SizedBox(
width: 8.0,
),
Padding(
padding: EdgeInsets.only(top: 6.0),
child: Text(
message.author,
style: TextStyle(fontSize: 10.0, color: Colors.grey),
),
),
],
)),
)
]
);
Here is the full version of my dummy code:
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
#override
Widget build(BuildContext context) {
return MaterialApp(
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
#override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
List<String> username = ['foo', 'bar', 'foo', 'bar', 'foo'];
List<String> messages = ['aaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'bb', 'cccccccccccccccccccccccccccccc', 'dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd', 'ee'];
List<String> time = ['131', '6454', '54564', '54546', '88888'];
List<String> author = ['Jesus', 'Joseph', 'Mary', 'John', 'Cardo'];
#override
Widget build(BuildContext context){
return Scaffold(
body: Container(
color: Colors.blue[200],
child: ListView.builder(
itemCount: 5,
itemBuilder: (_, int index){
return Row(
mainAxisAlignment: username[index] == "foo" ? MainAxisAlignment.end : MainAxisAlignment.start,
children: [
Flexible(
child: Container(
padding: EdgeInsets.all(8.0),
margin: EdgeInsets.all(4.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8.0))),
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Flexible(
child: Container(
child: Text(
messages[index],
),
)
),
SizedBox(
width: 8.0,
),
Padding(
padding: EdgeInsets.only(top: 6.0),
child: Text(
time[index],
style: TextStyle(fontSize: 10.0, color: Colors.grey),
),
),
SizedBox(
width: 8.0,
),
Padding(
padding: EdgeInsets.only(top: 6.0),
child: Text(
author[index],
style: TextStyle(fontSize: 10.0, color: Colors.grey),
),
),
],
)),
)
]
);
}
)
)
);
}
}