import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text(
'Sample App',
),
),
body: const Center(
child: Text.rich(
TextSpan(
text: 'First',
style: TextStyle(fontSize: 30, color: Colors.red),
children: [
TextSpan(
text: 'Second',
style: TextStyle(fontSize: 40, color: Colors.blue),
),
TextSpan(
text: ' Third',
style: TextStyle(fontSize: 50, color: Colors.grey),
)
],
),
),
),
),
),
);
}
Video Link: