bottom_sheet_text.dart 871 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import 'package:flutter/material.dart';
  2. /// Description: 底部文字
  3. /// Time : 2021年12月03日 Friday
  4. /// Author : liuyuqi.gov@msncn
  5. class BottomSheetText extends StatelessWidget {
  6. const BottomSheetText({
  7. required this.question,
  8. required this.result,
  9. });
  10. final String question;
  11. final String result;
  12. @override
  13. Widget build(BuildContext context) {
  14. return RichText(
  15. text: TextSpan(
  16. style: DefaultTextStyle.of(context).style,
  17. children: <TextSpan>[
  18. TextSpan(
  19. text: '$question: ',
  20. style: const TextStyle(
  21. fontWeight: FontWeight.bold,
  22. fontSize: 22.0,
  23. )),
  24. TextSpan(
  25. text: '$result',
  26. style: const TextStyle(
  27. fontSize: 20.0,
  28. ),
  29. ),
  30. ],
  31. ),
  32. );
  33. }
  34. }