1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import 'package:flutter/material.dart';
- class ExamTitle extends StatelessWidget {
- const ExamTitle({
- super.key,
- required this.titleType,
- this.label,
- this.required,
- });
- final String? label;
- final String titleType;
- final bool? required;
- @override
- Widget build(BuildContext context) {
- return Container(
- padding: const EdgeInsets.only(
- top: 20,
- left: 30,
- bottom: 10,
- ),
- child: RichText(
- text: TextSpan(
- text: '',
- children: [
- if (required ?? false)
- TextSpan(
- text: "*",
- style: const TextStyle(color: Colors.red, fontSize: 20),
- ),
- TextSpan(
- text: label ?? '',
- style: TextStyle(
- fontSize: 24,
- color: Colors.black,
- fontFamily: "NotoSansSC",
- fontFamilyFallback: const ["NotoSansSC"],
- ),
- ),
- TextSpan(
- text: titleType,
- style: const TextStyle(fontSize: 25, color: Colors.grey),
- ),
- ],
- ),
- ),
- );
- }
- }
|