// Current code where children is a list of InlineSpans: child: Padding( padding: const EdgeInsets.all(16), child: RichText( text: TextSpan( style: TextStyle(fontSize: 24), children: [ // List TextSpan(text: 'Welcome to '), TextSpan( text: 'Flutter ', style: TextStyle(color: Colors.blue), ), TextSpan( text: 'RichText ', style: TextStyle(fontStyle: FontStyle.italic), ), TextSpan(text: 'example. '), TextSpan( text: 'Here, ', style: TextStyle(color: Colors.red), ), TextSpan(text: 'text can be styled differently.'), ], ), ), ), // The API if children could be a String, Text to represent a single child TextSpan, RichText to represent multiple children (pseudocode): child: Padding( padding: const EdgeInsets.all(16), child: RichText( style: TextStyle(fontSize: 24), children: [ // List 'Welcome to ', Text( 'Flutter ', style: TextStyle(color: Colors.blue), ), Text( 'RichText ', style: TextStyle(fontStyle: FontStyle.italic), ), 'example. ', Text( 'Here, ', style: TextStyle(color: Colors.red), ), 'text can be styled differently.', ], ), ),