0

I have code simple below

SingleChildScrollView(
   child: RichText(
      overflow: TextOverflow.clip,
      text: TextSpan(
        text: '${model.logMain.text}',
        style: DefaultTextStyle.of(context).style,
        children: <TextSpan>[
          TextSpan(
              text: '${model.value.text}',
              style: TextStyle(
                  color: Colors.blue,
                  fontWeight: FontWeight.bold)),
        ],
      ),
    ),
),

how to add (more) text when variable model.value.text change, please help me

codeape
  • 97,830
  • 24
  • 159
  • 188
kevin
  • 11
  • 2
  • 7

1 Answers1

0

when you change the value of data and you want the UI to Know about it just call

          setState(() {
                   value= "some new value";
                 });
Moaid ALRazhy
  • 1,604
  • 1
  • 3
  • 13