Home > Blockchain >  Align text based on bottom line like textAlign: TextAlign.bottom feature
Align text based on bottom line like textAlign: TextAlign.bottom feature

Time:02-17

screenshot Hi community, as you can see I would like to align text based on this red line, so if there is more text, they should go up, now i tried `textAlign: TextAlign.end // no align bottom? , but it seems not work for my case, plz help,Thank you!

CodePudding user response:

return MaterialApp(    
      home:  
          Column(
        children: [
          Expanded(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.end,
              children: const [
                Text('asd asdk\n alksd\n alksd '),
                Divider(
                  color: Colors.red,
                )
              ],
            ),
          ),
          const Expanded(child: SizedBox())
        ],
      ),
    );

CodePudding user response:

try this code:

Column(
  children: [
    Flexible(
      child: SizedBox(height: MediaQuery.of(context).size.height,),
    ),
    Text(...);
  ],
);
  • Related