|
|
|
@ -9,27 +9,17 @@ import 'package:flutter/services.dart'; |
|
|
|
|
import 'package:url_launcher/url_launcher.dart'; |
|
|
|
|
|
|
|
|
|
import '../../../flutter_quill.dart'; |
|
|
|
|
import '../../models/documents/attribute.dart'; |
|
|
|
|
import '../../models/documents/nodes/container.dart' as container_node; |
|
|
|
|
import '../../models/documents/nodes/embeddable.dart'; |
|
|
|
|
import '../../models/documents/nodes/leaf.dart' as leaf; |
|
|
|
|
import '../../models/documents/nodes/leaf.dart'; |
|
|
|
|
import '../../models/documents/nodes/line.dart'; |
|
|
|
|
import '../../models/documents/nodes/node.dart'; |
|
|
|
|
import '../../models/documents/style.dart'; |
|
|
|
|
import '../../models/structs/vertical_spacing.dart'; |
|
|
|
|
import '../../utils/color.dart'; |
|
|
|
|
import '../../utils/font.dart'; |
|
|
|
|
import '../../utils/platform.dart'; |
|
|
|
|
import '../others/box.dart'; |
|
|
|
|
import '../others/cursor.dart'; |
|
|
|
|
import '../others/default_styles.dart'; |
|
|
|
|
import '../others/delegate.dart'; |
|
|
|
|
import '../others/keyboard_listener.dart'; |
|
|
|
|
import '../others/link.dart'; |
|
|
|
|
import '../others/proxy.dart'; |
|
|
|
|
import '../others/text_selection.dart'; |
|
|
|
|
import 'quill_controller.dart'; |
|
|
|
|
|
|
|
|
|
class TextLine extends StatefulWidget { |
|
|
|
|
const TextLine({ |
|
|
|
@ -305,10 +295,13 @@ class _TextLineState extends State<TextLine> { |
|
|
|
|
|
|
|
|
|
final lineHeight = widget.line.style.attributes[Attribute.lineHeight.key]; |
|
|
|
|
final x = <Attribute, TextStyle>{ |
|
|
|
|
LineHeightAttribute.lineHeightNormal: defaultStyles.lineHeightNormal!.style, |
|
|
|
|
LineHeightAttribute.lineHeightNormal: |
|
|
|
|
defaultStyles.lineHeightNormal!.style, |
|
|
|
|
LineHeightAttribute.lineHeightTight: defaultStyles.lineHeightTight!.style, |
|
|
|
|
LineHeightAttribute.lineHeightOneAndHalf: defaultStyles.lineHeightOneAndHalf!.style, |
|
|
|
|
LineHeightAttribute.lineHeightDouble: defaultStyles.lineHeightDouble!.style, |
|
|
|
|
LineHeightAttribute.lineHeightOneAndHalf: |
|
|
|
|
defaultStyles.lineHeightOneAndHalf!.style, |
|
|
|
|
LineHeightAttribute.lineHeightDouble: |
|
|
|
|
defaultStyles.lineHeightDouble!.style, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
textStyle = |
|
|
|
|