santa112358 / hashtagable

Widgets and functions to implement hashTag decorated text.
https://pub.dev/packages/hashtagable
MIT License
30 stars 50 forks source link

It's not possible to use styles, e.g. GoogleFonts #34

Closed run81 closed 4 years ago

run81 commented 4 years ago

This is not possible to use:

style: GoogleFonts.roboto( fontSize: 12, fontWeight: FontWeight.w200, ),

santa112358 commented 4 years ago

@1-2-77 Thank you for creating this issue! HashTagText and HashtagTextField don't inherit theme textStyle, so you need to add color: in your google fonts. I guess it will solve your problem👍

run81 commented 4 years ago

Can you please provide an example? It's not possible to use the style parameter which is needed to implement the font.

On Wed, 16 Sep 2020, 09:20 Santa Takahashi, notifications@github.com wrote:

@1-2-77 https://github.com/1-2-77 Thank you for creating this issue! HashTagText and HashtagTextField don't inherit theme textStyle, so you need to add color: in your google fonts. I guess it will solve your problem👍

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/santa112358/hashtagable/issues/34#issuecomment-693223503, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACDHRXB434XW5TCHQIBUWSDSGBRL5ANCNFSM4RM7CP7Q .

santa112358 commented 4 years ago

@1-2-77 Sure, like this.

HashTagTextField(
  basicStyle: GoogleFonts.pacifico(
    color: Colors.black,
    fontSize: 14,
    fontWeight: FontWeight.w200,
  ),
  decoratedStyle: GoogleFonts.pacifico(
    color: Colors.red,
    fontSize: 14,
    fontWeight: FontWeight.w200,
  ),
),

What you have been missing is the line color: in textStyle. Does it make sense?

santa112358 commented 4 years ago

@1-2-77 The issue looks like solved, so now I close this