From bd2253ee7a0eb305b5a122cc4ae003b98ea6f6b9 Mon Sep 17 00:00:00 2001 From: "sanfan.hx" Date: Mon, 14 Jan 2019 22:58:36 +0800 Subject: [PATCH 1/2] feat(text demo): ; --- .../elements/Form/Text/RichText/demo.dart | 33 +++++++++++++++++++ .../elements/Form/Text/RichText/index.dart | 17 ++-------- 2 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 lib/widgets/elements/Form/Text/RichText/demo.dart diff --git a/lib/widgets/elements/Form/Text/RichText/demo.dart b/lib/widgets/elements/Form/Text/RichText/demo.dart new file mode 100644 index 00000000..559743de --- /dev/null +++ b/lib/widgets/elements/Form/Text/RichText/demo.dart @@ -0,0 +1,33 @@ +/** + * Created with Android Studio. + * User: 三帆 + * Date: 14/01/2019 + * Time: 19:02 + * email: sanfan.hx@alibaba-inc.com + * tartget: xxx + */ + +import 'package:flutter/material.dart'; + +class Demo extends StatefulWidget { + _Demo createState() => _Demo(); +} + +class _Demo extends State { + + Widget build(BuildContext context) { + return Container( + color: Color(0xff000000), + width: 750.0, + child: RichText( + text: TextSpan( + text: 'Hello ', + children: [ + TextSpan(text: 'bold', style: TextStyle(fontWeight: FontWeight.bold, color: Color(0xfffffc42))), + TextSpan(text: ' world!', style: TextStyle(fontStyle: FontStyle.italic)), + ], + ), + ), + ); + } +} diff --git a/lib/widgets/elements/Form/Text/RichText/index.dart b/lib/widgets/elements/Form/Text/RichText/index.dart index 6b3c9f98..11f7118b 100644 --- a/lib/widgets/elements/Form/Text/RichText/index.dart +++ b/lib/widgets/elements/Form/Text/RichText/index.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_markdown/flutter_markdown.dart'; import '../../../../../common/widget_demo.dart'; - +import 'demo.dart'; const String intro = """ # 富文本显示 @@ -70,20 +70,7 @@ class _Demo extends State { contentList: [new Column( children: [ MarkdownBody(data: markDesc['intro']), - Container( - color: Color(0xff000000), - width: 750.0, - child: RichText( - text: TextSpan( - text: 'Hello ', -// style: TextStyle(fontWeight: FontWeight.normal, inherit: true, fontSize: 44), - children: [ - TextSpan(text: 'bold', style: TextStyle(fontWeight: FontWeight.bold, color: Color(0xfffffc42))), - TextSpan(text: ' world!', style: TextStyle(fontStyle: FontStyle.italic)), - ], - ), - ), - ), + Demo(), MarkdownBody(data: markDesc['diff']), ], ), From 5dd2d87e46e78fe9cf8f1a792f03c069bb68e0ad Mon Sep 17 00:00:00 2001 From: ryan730 Date: Mon, 14 Jan 2019 23:00:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?Add:=20=E5=A2=9E=E5=8A=A0=E6=89=8B=E5=86=8C?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/components/fourth_page_feature/pages.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/components/fourth_page_feature/pages.dart b/lib/components/fourth_page_feature/pages.dart index 6e7996b8..e21ea01e 100644 --- a/lib/components/fourth_page_feature/pages.dart +++ b/lib/components/fourth_page_feature/pages.dart @@ -6,14 +6,14 @@ final pages = [ new PageViewModel( const Color(0xFFcd344f), //'assets/mountain.png', - 'assets/images/p1.png', + 'assets/images/p2.png', 'FlutterGo是什么?', '【FlutterGo】 是由"阿里拍卖"前端团队几位 Flutter 粉丝,用业余时间开发的一款,用于 Flutter 教学帮助的App,这里没有高大尚的概念,只有一个一个亲历的尝试,用最直观的方式展示的 Flutter 官方demo', 'assets/images/plane.png'), new PageViewModel( const Color(0xFF638de3), //'assets/world.png', - 'assets/images/p2.png', + 'assets/images/p1.png', 'FLutterGo的背景', '🐢 官网文档示例较不够健全,不够直观\n🐞 运行widget demo要到处翻阅资料\n🐌 英文文档翻译生涩难懂,学习资料太少\n', 'assets/images/calendar.png'),