12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import 'package:flutter/material.dart';
- class AppTextSpan extends StatelessWidget {
- final String text1;
- final String text2;
- final Color? text1Color;
- final Color? text2Color;
- final double fontSize;
- const AppTextSpan({
- super.key,
- required this.text1,
- required this.text2,
- required this.fontSize,
- this.text1Color,
- this.text2Color,
- });
- @override
- Widget build(BuildContext context) {
- return RichText(
- text: TextSpan(
- style: TextStyle(
- fontSize: fontSize,
- color: Colors.black,
- ),
- children: [
- TextSpan(
- text: '$text1: ',
- style: TextStyle(
- color: text1Color,
- fontWeight: FontWeight.bold,
- ),
- ),
- TextSpan(
- text: text2,
- style: TextStyle(
- color: text2Color,
- ),
- ),
- ],
- ),
- );
- }
- }
|