Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

flutter text with icon

Flutter has WidgetSpan() to add a widget inside the RichText().

Example use:

RichText(
  text: TextSpan(
    children: [
      TextSpan(
        text: "Click ",
      ),
      WidgetSpan(
        child: Icon(Icons.add, size: 14),
      ),
      TextSpan(
        text: " to add",
      ),
    ],
  ),
)

Above code will produce:

Click + to add

You can treat the child of WidgetSpan like the usual widget.
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery read href attribute 
Javascript :: reload page 
Javascript :: get full date in javascript 
Javascript :: random number generator javascript 
Javascript :: getelementbyxpath 
Javascript :: update an item in array of object 
Javascript :: localstorage save array 
Javascript :: check if array does not contain value javascript 
Javascript :: invalid geojson object leaflet 
Javascript :: array unique values javascript 
Javascript :: send data through routes in react 
Javascript :: alias import javascript 
Javascript :: settimeout 
Javascript :: javascript select all divs with class 
Javascript :: printf statement in javascript 
Javascript :: react-native android 
Javascript :: angular 8 to 9 
Javascript :: js create timestamp with 10 digits 
Javascript :: validate age javascript 
Javascript :: http get request js 
Javascript :: javascript remove text from string 
Javascript :: get the parent node from child node 
Javascript :: number pyramid javascript 
Javascript :: react native open link in browser 
Javascript :: javascript console output 
Javascript :: Jspinner max and min value 
Javascript :: javascript clone array of object 
Javascript :: chart js two y axis 
Javascript :: local storage javascript 
Javascript :: difference between slice and splice 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =