saminsohag

maxLines added

buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.7.20'
repositories {
google()
mavenCentral()
... ... @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
... ...
... ... @@ -178,6 +178,7 @@ Markdown and LaTeX can be powerful tools for formatting text and mathematical ex
debugPrint(url);
debugPrint(title);
},
maxLines: null,
textAlign: TextAlign.justify,
// textScaler: const TextScaler.linear(1.3),
textScaler: const TextScaler.linear(1),
... ...
... ... @@ -32,4 +32,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
COCOAPODS: 1.14.3
COCOAPODS: 1.15.2
... ...
... ... @@ -18,6 +18,7 @@ class TexMarkdown extends StatelessWidget {
this.onLinkTab,
this.latexBuilder,
this.codeBuilder,
this.maxLines,
});
final TextDirection textDirection;
final String data;
... ... @@ -26,6 +27,7 @@ class TexMarkdown extends StatelessWidget {
final TextScaler? textScaler;
final void Function(String url, String title)? onLinkTab;
final String Function(String tex)? latexWorkaround;
final int? maxLines;
final Widget Function(
BuildContext context, String tex, TextStyle style, bool inline)?
latexBuilder;
... ... @@ -68,6 +70,7 @@ class TexMarkdown extends StatelessWidget {
latexWorkaround: latexWorkaround,
latexBuilder: latexBuilder,
codeBuilder: codeBuilder,
maxLines: maxLines,
));
}
}
... ...
... ... @@ -10,7 +10,7 @@ import 'md_widget.dart';
/// Markdown components
abstract class MarkdownComponent {
static List<MarkdownComponent> get components => [
static final List<MarkdownComponent> components = [
CodeBlockMd(),
NewLines(),
TableMd(),
... ...
... ... @@ -17,6 +17,7 @@ class MdWidget extends StatelessWidget {
this.latexBuilder,
this.followLinkColor = false,
this.codeBuilder,
this.maxLines,
});
final String exp;
final TextDirection textDirection;
... ... @@ -31,6 +32,7 @@ class MdWidget extends StatelessWidget {
final bool followLinkColor;
final Widget Function(BuildContext context, String name, String code)?
codeBuilder;
final int? maxLines;
@override
Widget build(BuildContext context) {
... ... @@ -64,6 +66,7 @@ class MdWidget extends StatelessWidget {
textDirection: textDirection,
textScaler: textScaler,
textAlign: textAlign,
maxLines: maxLines,
);
}
}
... ...