exam_title.dart 785 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import 'package:flutter/material.dart';
  2. class ExamTitle extends StatelessWidget {
  3. const ExamTitle({
  4. super.key,
  5. required this.titleType,
  6. this.label,
  7. });
  8. final String? label;
  9. final String titleType;
  10. @override
  11. Widget build(BuildContext context) {
  12. return Container(
  13. padding: const EdgeInsets.only(
  14. top: 20,
  15. left: 30,
  16. bottom: 15,
  17. ),
  18. child: RichText(
  19. text: TextSpan(
  20. text: label ?? '',
  21. style: const TextStyle(
  22. fontSize: 25,
  23. color: Colors.black,
  24. ),
  25. children: [
  26. TextSpan(
  27. text: titleType,
  28. style: const TextStyle(fontSize: 25, color: Colors.grey),
  29. ),
  30. ],
  31. ),
  32. ),
  33. );
  34. }
  35. }