Make markdown images clickable (full screen)
This commit is contained in:
parent
7ed1afbfdd
commit
332d4298ff
|
@ -1,5 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_markdown/flutter_markdown.dart' as mdf;
|
import 'package:flutter_markdown/flutter_markdown.dart' as mdf;
|
||||||
|
import 'package:interstellar/src/models/image.dart';
|
||||||
|
import 'package:interstellar/src/widgets/image.dart';
|
||||||
import 'package:interstellar/src/widgets/open_webpage.dart';
|
import 'package:interstellar/src/widgets/open_webpage.dart';
|
||||||
|
|
||||||
import './markdown_mention.dart';
|
import './markdown_mention.dart';
|
||||||
|
@ -26,6 +28,18 @@ class Markdown extends StatelessWidget {
|
||||||
openWebpage(context, Uri.parse(href));
|
openWebpage(context, Uri.parse(href));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
imageBuilder: (uri, title, alt) {
|
||||||
|
return AdvancedImage(
|
||||||
|
ImageModel(
|
||||||
|
src: uri.toString(),
|
||||||
|
altText: alt,
|
||||||
|
blurHash: null,
|
||||||
|
blurHashWidth: null,
|
||||||
|
blurHashHeight: null,
|
||||||
|
),
|
||||||
|
openTitle: title ?? '',
|
||||||
|
);
|
||||||
|
},
|
||||||
inlineSyntaxes: [
|
inlineSyntaxes: [
|
||||||
SubscriptMarkdownSyntax(),
|
SubscriptMarkdownSyntax(),
|
||||||
SuperscriptMarkdownSyntax(),
|
SuperscriptMarkdownSyntax(),
|
||||||
|
|
Loading…
Reference in New Issue