fix: properly align bullet points

pull/1226/head
Adil Hanney 2 years ago
parent 6d18c4eba5
commit f2a697b545
  1. 4
      lib/src/widgets/style_widgets/bullet_point.dart
  2. 1
      lib/src/widgets/text_block.dart

@ -4,18 +4,20 @@ class QuillBulletPoint extends StatelessWidget {
const QuillBulletPoint({ const QuillBulletPoint({
required this.style, required this.style,
required this.width, required this.width,
this.padding = 0,
Key? key, Key? key,
}) : super(key: key); }) : super(key: key);
final TextStyle style; final TextStyle style;
final double width; final double width;
final double padding;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
alignment: AlignmentDirectional.topEnd, alignment: AlignmentDirectional.topEnd,
width: width, width: width,
padding: const EdgeInsetsDirectional.only(end: 13), padding: EdgeInsetsDirectional.only(end: padding),
child: Text('', style: style), child: Text('', style: style),
); );
} }

@ -191,6 +191,7 @@ class EditableTextBlock extends StatelessWidget {
style: style:
defaultStyles.leading!.style.copyWith(fontWeight: FontWeight.bold), defaultStyles.leading!.style.copyWith(fontWeight: FontWeight.bold),
width: fontSize * 2, width: fontSize * 2,
padding: fontSize / 2,
); );
} }

Loading…
Cancel
Save