Top align text vertically for training and main text in a ListTile

Viewed 27

For this ListTile the text is center aligned vertially. I would like to top align the text. What would be the best way to handle that? is it possible with a ListTile?

          child: ListTile(

            onTap: () {
              NavigationService.instance.navigateToReplacement(Transactions.route);
            },
            trailing: Text(NumberFormat.simpleCurrency().format(item.balance),
              style: const TextStyle(
                fontSize: GlobalUI.listHeaderFontSize,
                fontWeight: FontWeight.normal,
              ),
            ),
            title: Text(item.name,
              style: const TextStyle(
                fontSize: GlobalUI.listHeaderFontSize,
                fontWeight: FontWeight.normal,
              ),),
          ),
1 Answers

you can wrap your Text widget around an Align widget

Align(
  alignment: Alignment.topCenter,
  child: ...//your text widget
);
Related