2024-06-15 01:25:09 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class TextWithBold extends StatelessWidget {
|
|
|
|
final String? leadingText;
|
|
|
|
final String boldText;
|
|
|
|
final String? trailingText;
|
2024-06-20 03:44:53 +02:00
|
|
|
final double? leadingSize;
|
|
|
|
final double? boldSize;
|
|
|
|
final double? trailingSize;
|
2024-06-15 01:25:09 +02:00
|
|
|
|
2024-06-20 03:44:53 +02:00
|
|
|
const TextWithBold({
|
|
|
|
super.key,
|
|
|
|
this.leadingText,
|
|
|
|
required this.boldText,
|
|
|
|
this.trailingText,
|
|
|
|
this.leadingSize,
|
|
|
|
this.boldSize,
|
|
|
|
this.trailingSize,
|
|
|
|
});
|
2024-06-15 01:25:09 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Text.rich(
|
|
|
|
TextSpan(
|
|
|
|
children: [
|
2024-06-20 03:44:53 +02:00
|
|
|
TextSpan(
|
|
|
|
text: leadingText,
|
|
|
|
style: TextStyle(fontSize: leadingSize),
|
|
|
|
),
|
2024-06-15 01:25:09 +02:00
|
|
|
TextSpan(
|
|
|
|
text: boldText,
|
2024-06-20 03:44:53 +02:00
|
|
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: boldSize),
|
|
|
|
),
|
|
|
|
TextSpan(
|
|
|
|
text: trailingText,
|
|
|
|
style: TextStyle(fontSize: trailingSize),
|
2024-06-15 01:25:09 +02:00
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|