andyduke / styled_text_package

Text widget with formatted text using tags. Makes it easier to use formatted text in multilingual applications.
https://pub.dev/packages/styled_text
BSD 3-Clause "New" or "Revised" License
74 stars 48 forks source link

fix theme issue while changing light to dark theme #50

Closed srkrishnan1989 closed 2 years ago

srkrishnan1989 commented 2 years ago

Hi dev,

first of all, thanks for the great work.

issue is while changing light to dark theme, styled_text text remain as light theme text color, when scrolling styled_text text changed to dark theme text color.

styled_text not working with theme changing.

andyduke commented 2 years ago

@srkrishnan1989 Please provide the minimum code to reproduce the problem.

srkrishnan1989 commented 2 years ago

@srkrishnan1989 Please provide the minimum code to reproduce the problem.

create fresh app using "flutter create -t skeleton my_app"

just replace code using styled_text on "sample_item_list_view.dart" file

replace this code
title: Text('SampleItem ${item.id}'),

with

title: StyledText(
                text: '<b>SampleItem ${item.id}</b>',
                tags: {
                  'b': StyledTextTag(
                      style: TextStyle(fontWeight: FontWeight.bold)),
                },
              ),

change items list length to 30 count, now run the app,

click gear icon on appbar and change system theme to dark and go back,

now scroll

andyduke commented 2 years ago

@srkrishnan1989 Please show the output of the command flutter doctor -v

andyduke commented 2 years ago

@srkrishnan1989 The problem is solved in the new version 5.0.0. Please check if this helped you.