I have pageView builder which each page contains different paragraph I want to let this paragraph take all the space in page without spaces to be in the same aligment.
I tried it by my my problem was that some paragraphs come with 7 lines which can take 100% of the page but some of them come with 3 lines and does not take remaining space takes only 30% from the page
Tried code:
Expanded(
child: AutoSizeText.rich(
textAlign: index == 0 ? TextAlign.center : TextAlign.justify,
TextSpan(
children: [
for (var i = 1; i <= list.length; i++) ...{
TextSpan(
text: "${list[i - 1]} ",
style: GoogleFonts.balooBhai2(
fontSize: 25,
color: Colors.black87,
),
),
}
],
),
),
),
Expected result:all texts on all pages is the same height
The result is: some texts take 50% of the page some it take 150% some it take 100%
2
Answers
I fixed the issue by this code
Try this: