From 9cac22e61639e81c6dc7ea31a0821dbfb826e879 Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Sat, 30 Nov 2019 22:44:55 +0800 Subject: [PATCH] fix: markdown style --- .metadata | 10 ---------- lib/widgets/markdown_view.dart | 9 +++++++++ pubspec.yaml | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 .metadata diff --git a/.metadata b/.metadata deleted file mode 100644 index aeb01ee..0000000 --- a/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 2d2a1ffec95cc70a3218872a2cd3f8de4933c42f - channel: stable - -project_type: app diff --git a/lib/widgets/markdown_view.dart b/lib/widgets/markdown_view.dart index fea97f9..50c05d2 100644 --- a/lib/widgets/markdown_view.dart +++ b/lib/widgets/markdown_view.dart @@ -113,10 +113,19 @@ class MarkdownView extends StatelessWidget { fontSize: 16 * 0.85, color: theme.palette.tertiaryText), em: _basicStyle.copyWith(fontStyle: FontStyle.italic), strong: _basicStyle.copyWith(fontWeight: FontWeight.w600), + del: const TextStyle(decoration: TextDecoration.lineThrough), blockquote: _basicStyle.copyWith(color: theme.palette.tertiaryText), img: _basicStyle, + checkbox: _basicStyle, blockSpacing: 16, listIndent: 32, + listBullet: _basicStyle, + tableHead: _basicStyle, + tableBody: _basicStyle, + tableHeadAlign: TextAlign.center, + tableBorder: TableBorder.all(color: Colors.grey.shade300, width: 0), + tableColumnWidth: const FlexColumnWidth(), + tableCellsPadding: const EdgeInsets.fromLTRB(16, 8, 16, 8), blockquotePadding: EdgeInsets.symmetric(horizontal: 16), blockquoteDecoration: BoxDecoration( border: Border(left: BorderSide(color: Color(0xffdfe2e5), width: 4)), diff --git a/pubspec.yaml b/pubspec.yaml index 9cffdfd..fddbbb6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -25,7 +25,7 @@ dependencies: intl: ^0.16.0 url_launcher: ^5.0.2 uni_links: ^0.1.4 - flutter_markdown: ^0.3.0 + flutter_markdown: ^0.3.2 shared_preferences: ^0.5.0 share: ^0.6.0 flutter_svg: ^0.13.0