title: const Text("Test", style: TextStyle(color: Colors.black)), actions: [ Column(children: <Widget>[ Align(alignment: Alignment.topLeft), Image.asset( 'Assets/Images/calendar.png', ), Text(formattedDate, style: TextStyle(color: Colors.black)) ]),
To position the icon same line with text
2
You can use Row widget.
Row
title: const Text("Test", style: TextStyle(color: Colors.black)), actions: [ Row( mainAxisSize: MainAxisSize.min, children: <Widget>[ // Align(alignment: Alignment.topLeft), Image.asset( 'Assets/Images/calendar.png', ), Text(formattedDate, style: TextStyle(color: Colors.black)) ]),
More about layout in flutter
This may work !!
title: const Text("Test", style: TextStyle(color: Colors.black)), actions: const [ Center( child: Padding( padding: EdgeInsets.only(right: 8.0), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: <Widget>[ // Align(alignment: Alignment.topLeft), Icon(Icons.calendar_month), Text("formattedDate", style: TextStyle(color: Colors.black)) ]), ), ), ]
Click here to cancel reply.
2
Answers
You can use
Row
widget.More about layout in flutter
This may work !!