WritingGuidelinesStyle constructor
const
WritingGuidelinesStyle({
- required double fontSize,
- Color lineColor = const Color(0xFFE0E0E0),
- double lineWidth = 1.0,
- double baselineRatio = 2 / 3,
- double heightRatio = 1.5,
- Color? backgroundColor,
- EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 4.0),
- VoidCallback? onTap,
创建写字格的样式配置。
Implementation
const WritingGuidelinesStyle({
required this.fontSize,
this.lineColor = const Color(0xFFE0E0E0),
this.lineWidth = 1.0,
this.baselineRatio = 2 / 3,
this.heightRatio = 1.5,
this.backgroundColor,
this.padding = const EdgeInsets.symmetric(horizontal: 4.0),
this.onTap,
}) : assert(
baselineRatio >= 0.0 && baselineRatio <= 1.0,
'baselineRatio 必须在 0.0 到 1.0 之间',
),
assert(heightRatio > 0, 'heightRatio 必须大于 0');