27 lines
622 B
Dart
27 lines
622 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class TextWithBold extends StatelessWidget {
|
|
final String? leadingText;
|
|
final String boldText;
|
|
final String? trailingText;
|
|
|
|
const TextWithBold(
|
|
{super.key, this.leadingText, required this.boldText, this.trailingText});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Text.rich(
|
|
TextSpan(
|
|
children: [
|
|
TextSpan(text: leadingText),
|
|
TextSpan(
|
|
text: boldText,
|
|
style: const TextStyle(fontWeight: FontWeight.bold),
|
|
),
|
|
TextSpan(text: trailingText),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|