bottom_sheet_text.dart 734 B

12345678910111213141516171819202122232425262728293031323334
  1. import 'package:flutter/material.dart';
  2. class BottomSheetText extends StatelessWidget {
  3. const BottomSheetText({
  4. this.question,
  5. this.result,
  6. });
  7. final String question;
  8. final String result;
  9. @override
  10. Widget build(BuildContext context) {
  11. return RichText(
  12. text: TextSpan(
  13. style: DefaultTextStyle.of(context).style,
  14. children: <TextSpan>[
  15. TextSpan(
  16. text: '$question: ',
  17. style: TextStyle(
  18. fontWeight: FontWeight.bold,
  19. fontSize: 22.0,
  20. )),
  21. TextSpan(
  22. text: '$result',
  23. style: TextStyle(
  24. fontSize: 20.0,
  25. ),
  26. ),
  27. ],
  28. ),
  29. );
  30. }
  31. }