fluttercandies / extended_sliver

A powerful extension library of Sliver, which include SliverToNestedScrollBoxAdapter, SliverPinnedPersistentHeader, SliverPinnedToBoxAdapter and ExtendedSliverAppbar.
MIT License
165 stars 30 forks source link

ExtendedSliverAppbar title文本超过屏幕时越界 #7

Closed iptodays closed 2 years ago

iptodays commented 3 years ago

image

khaledMahmoudDev commented 2 years ago

wrap your text with SizedBox and and add width to the sizedBox for me

  SizedBox(
                            width: MediaQuery.of(context).size.width *.8,
                            child:
                            Text( longText,  ),
                          ),
zmtzawqlp commented 2 years ago

@iptodays you can try as @khaledMahmoudDev said.

austinried commented 2 years ago

Using MediaQuery here is not a good solution here I think, how do I know for sure that my actions take up the other 20% of the space in this example?

Why doesn't the parent widget for title provide a width constraint?