Sunday, 10 October 2021

Call a function inside a TextSpan? - Flutter

I want to call a function checkProportion() inside a TextSpan. Is it possible?

Here is the code that I want to include the function:

children: [
                TextSpan(
                  text: widget.result + '  ',
                  style: TextStyle(
                    fontSize: 20.0,
                    fontWeight: FontWeight.bold,
                    color: checkdominantA(widget.predominant, widget.result),
                    height: 2.5,
                    letterSpacing: 0.7,
                  ),
                ),
                //...
              ] // children


from Call a function inside a TextSpan? - Flutter

No comments:

Post a Comment