Skip to content

Add flutter markdown to packages in preparation for deprecation of flutter_markdown package. #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 145 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
842a619
Adds initial version of Markdown renderer
vlidholt Feb 25, 2016
051d06c
Initial support for links in markdown
vlidholt Mar 10, 2016
df470ae
Enable ALL THE LINTS
Hixie Mar 11, 2016
170c83d
Markdown is now correctly updated when config changes
vlidholt Mar 10, 2016
4f91fa5
Merge pull request #2589 from vlidholt/master
vlidholt Mar 11, 2016
ce395bc
[rename fixit] ThemeData#text -> textTheme
abarth Mar 12, 2016
7375126
[rename fixit] EdgeDims -> EdgeInsets
abarth Mar 12, 2016
cb5f204
[rename fixit] *Component* -> *Widget*
abarth Mar 12, 2016
3c1abc7
[rename fixit] RouteBuilder -> BuildContext
abarth Mar 13, 2016
569f7b4
[rename fixit] ToolBar -> AppBar
abarth Mar 13, 2016
6936bea
[rename fixit] Flex alignments
abarth Mar 13, 2016
a11aa65
Add @override annotations to flutter framework
Hixie Mar 14, 2016
f6ac7ff
add a dev/dartdoc.dart script to generate docs for the packages/ pack…
devoncarew Apr 5, 2016
47caf75
Remove pub package version skew (#3212)
abarth Apr 8, 2016
35cd2d4
[flutter_test] new WidgetTester API based on finder objects (#3288)
yjbanov Apr 14, 2016
5bf7bac
Hide routes from the API when they're not needed. (#3431)
Hixie Apr 20, 2016
f154c3d
Make the widgets binding reusable. (#3479)
Hixie Apr 21, 2016
9e7c61a
Rename binding abstract classes (#3482)
Hixie Apr 22, 2016
11b6c0b
Refactor the test framework (#3622)
Hixie Apr 29, 2016
293b022
Last literals get their types.
pq May 4, 2016
6b77fc7
checked mode fix; add type annotation (#3737)
devoncarew May 4, 2016
f7f9088
Merge pull request #3738 from pq/annotate_literals_3
pq May 4, 2016
3b33c09
Move TextAlign out of TextStyle (#3789)
abarth May 7, 2016
62d0427
Turn on `avoid_return_types_on_setters` and cleanup annotated setters.
pq May 12, 2016
b7db173
Make it possible to run tests live on a device (#3936)
Hixie May 16, 2016
cdb6c75
Cleanup dangling comment references.
pq May 19, 2016
7de6979
Use protected and mustCallSuper in more places (#4291)
abarth Jun 1, 2016
c70d208
Loosen dependencies on string_scanner (#4412)
abarth Jun 7, 2016
145dcbb
Refactor everything to do with images (#4583)
Hixie Jun 16, 2016
72c0f51
Update Dart (1.19.0-dev.0.0) and analyzer (0.27.4-alpha.19).
pq Jul 27, 2016
09a1113
Update Dart (1.19.0-dev.0.0) and analyzer (0.27.4-alpha.19).
pq Jul 27, 2016
5a7b42a
Merge branch 'dart_1.19.0-dev.0.0' of github.com:pq/flutter into dart…
pq Jul 27, 2016
bec76dc
Merge branch 'dart_1.19.0-dev.0.0' of github.com:pq/flutter into dart…
pq Jul 27, 2016
3f7ddae
Merge branch 'dart_1.19.0-dev.0.0' of github.com:pq/flutter into dart…
pq Jul 27, 2016
32c4fec
Use named Image constructors (#5129)
abarth Jul 29, 2016
0f2bba5
Rename Image.fromNetwork and Image.fromAssetBundle (#5149)
abarth Jul 29, 2016
306fd79
Added BorderRadius. (#5072)
dragostis Jul 29, 2016
f71fd20
Use SDK sources to refer to our own packages (#6001)
abarth Sep 23, 2016
bec6205
Fix Gallery example code display initialization (#6176)
Oct 3, 2016
6e1fe0f
commit intellij project metadata (#6232)
devoncarew Oct 7, 2016
1937573
Deploy `@checked` (#6244)
abarth Oct 7, 2016
58e4569
Update iml files (#6300)
abarth Oct 13, 2016
3b8d3f4
Update IML files
abarth Oct 14, 2016
31011de
More automated edits of iml files
abarth Oct 15, 2016
4e46bc3
Fix common typos in doc comments (#6520)
cbracken Oct 25, 2016
b3c1f40
Mentions `flutter packages get` rather than `pub get` (#6625)
abarth Nov 1, 2016
2090963
revert args to 0.13.6 (#6765)
Nov 8, 2016
eb60a58
Refactor flutter command exit code - part 3 of 3 (#6838)
Nov 14, 2016
b289cfb
Rename Flexible to Expanded and improve docs (#6978)
abarth Nov 22, 2016
bff2260
Update iml files (#7025)
abarth Nov 27, 2016
126dba5
Use sliver-based scrolling in more places (#7892)
abarth Feb 6, 2017
33c25e0
Remove mentions of ScrollableViewport from flutter_markdown (#8132)
abarth Feb 14, 2017
f9bfe35
prefer const constructor (#8292)
a14n Feb 20, 2017
3d5bb10
Replace @checked with covariant (#8300)
a14n Feb 21, 2017
b382fc7
Ignore HTML in flutter_markdown content without error (#8420)
ilikerobots Feb 27, 2017
870a649
prefer_is_empty and prefer_is_not_empty (#8474)
a14n Mar 2, 2017
1bbe4b6
Declare locals final where not reassigned (flutter_markdown) (#8568)
cbracken Mar 4, 2017
2fe6754
Flutter style guide: Prefer naming the argument to a setter 'value' (…
a14n Mar 10, 2017
c455558
Rename dependenciesChanged to didChangeDependencies (#8767)
abarth Mar 14, 2017
bff629d
use color.shadeXxx instead of color[Xxx] (#8932)
a14n Mar 21, 2017
56506e8
Update and modernize the flutter_markdown package (#9044)
abarth Mar 28, 2017
7898bc3
Constants! Constants everywhere! (#9286)
Hixie Apr 7, 2017
7ae0b5d
Rename State.config to widget everywhere (#9273)
xster Apr 11, 2017
3d45aee
update the IntelliJ metadata files (#9388)
devoncarew Apr 14, 2017
721ee7b
IntelliJ metadata cleanup (flutter-intellij#914). (#9427)
pq Apr 17, 2017
795ce58
make @immutable const classes (#9532)
a14n Apr 21, 2017
a103c54
BoxDecoration API changes: backgroundColor -> color et al (#9648)
Hixie Apr 27, 2017
cf9e441
Add .gitignore and update pubspec.yaml
abarth May 4, 2017
7fd68cb
Add package:meta dependency
abarth May 4, 2017
6738a2a
Add LICENSE
abarth May 4, 2017
58be321
Add SDK constraint
abarth May 4, 2017
21a4cd0
Fix flutter_markdown_test given recent updates to Flutter (#5)
tvolkert Sep 29, 2017
3344aad
Rev version (#6)
tvolkert Sep 29, 2017
958f1ae
Add pub badge to README
xqwzts Oct 29, 2017
f947f3e
Add GestureRecognizer to children of 'a' Tag (#9)
xqwzts Nov 2, 2017
af15481
Add example and tests for images
mit-mit Nov 3, 2017
39c012a
Merge with upstream
mit-mit Nov 3, 2017
01962f6
Add onTap fix from yesterday to changelog
mit-mit Nov 3, 2017
2a230b9
Fix bad merge
mit-mit Nov 3, 2017
fc02628
Update .gitignore
xqwzts Nov 4, 2017
c1400e5
Merge pull request #15 from xqwzts/patch-1
mit-mit Nov 6, 2017
66bfe88
Review feedback
mit-mit Nov 6, 2017
c0036a7
Merge pull request #10 from mit-mit/master
mit-mit Nov 6, 2017
03adc52
Update .gitignore
mit-mit Nov 6, 2017
e3b6044
Merge pull request #11 from xqwzts/update-gitignore
mit-mit Nov 6, 2017
d262fe3
Add Travis job for flutter test (#16)
mit-mit Nov 6, 2017
8d61e07
Fix img text style (#12)
xqwzts Nov 6, 2017
02f8637
Update .gitignore (#18)
xqwzts Dec 8, 2017
5ed7502
Add mock httpClient for image tests (#17)
xqwzts Dec 8, 2017
d810567
Inline images (#14)
xqwzts Dec 8, 2017
ffa0157
Add support for local image paths in Img tags
mit-mit Dec 18, 2017
6644f2e
Fix tests
mit-mit Dec 18, 2017
e36ddc2
Fix http parsing bug
mit-mit Dec 21, 2017
b58c010
Merge pull request #20 from mit-mit/files
mit-mit Dec 22, 2017
8342530
Update README.md
mit-mit Jan 3, 2018
90e4095
Update README.md
mit-mit Jan 4, 2018
069d820
Merge pull request #21 from flutter/mit-mit-imgdocs
mit-mit Jan 4, 2018
06aa68c
Fix the onTap callback for images (#24)
xqwzts Jan 9, 2018
bed98a7
Add support for Horizontal Rules (#25)
xqwzts Jan 11, 2018
c05091c
Declare dependencies
mit-mit Feb 20, 2018
1aa9c66
Merge pull request #30 from mit-mit/deps
mit-mit Feb 20, 2018
1517de0
added 'li' style to _buildBullet function
KevinTheGray Feb 27, 2018
f81a88b
updated pubspec and changelog
KevinTheGray Feb 27, 2018
9e780ec
Adds 'li' style to the _buildBullet function (#34)
KevinTheGray Feb 27, 2018
54a5588
Spelling (#35)
jsoref Mar 8, 2018
87c378e
Cirrus CI
fkorotkov Feb 9, 2018
8f6e1ca
Use Flutter 0.1.0
fkorotkov Feb 12, 2018
0db3b02
Use the latest available Flutter image
fkorotkov Mar 10, 2018
d97453b
Merge pull request #27 from fkorotkov/master
Hixie Mar 19, 2018
7debeba
Always upgrade Flutter to the latest master (#39)
fkorotkov Mar 28, 2018
c47aad1
Replace use of createHttpClient with mocks (#37)
cbracken Mar 28, 2018
7eab007
Merge with master git
KevinTheGray Mar 29, 2018
4c56d8d
Use coalesce operator.
westy92 Apr 5, 2018
f713a31
Capitalize 'Markdown.'
westy92 Apr 5, 2018
d981ddf
Prevent '&' and '<' from being escaped.
westy92 Apr 5, 2018
f537134
Ignore generated ios folder.
westy92 Apr 5, 2018
21cfb2f
Cleanup.
westy92 Apr 5, 2018
31a7555
Sync .gitignore with Flutter's template.
westy92 May 9, 2018
1a7b468
Update markdown to 2.0.0.
westy92 May 9, 2018
0a04b26
Improve unit tests.
westy92 May 9, 2018
fa1968f
Test numbered entites.
westy92 May 9, 2018
8e584d7
Update .gitignore to new `dart_tool` pub cache
bcko May 24, 2018
8df2e68
Rename demo.dart to example.dart
bcko May 26, 2018
0c0440a
Merge pull request #43 from westy92/master
Hixie May 29, 2018
c71ed61
Merge pull request #47 from bcko/patch-2
mit-mit Jun 25, 2018
f93fa69
Merge pull request #46 from bcko/patch-1
mit-mit Jun 25, 2018
bb71fc7
Update pubspec.yaml version for bump of markdown dependency
zanderso Aug 1, 2018
1bf6aa7
Merge pull request #49 from flutter/zanderso-patch-1
zanderso Aug 1, 2018
2f94c3c
Update CHANGELOG.md
zanderso Aug 1, 2018
39b1873
Merge pull request #50 from flutter/zanderso-patch-1
zanderso Aug 1, 2018
886c381
Merge branch 'master' of git://github.com/flutter/flutter_markdown
KevinTheGray Aug 17, 2018
2452271
updated environment sdk dependency to be compatible with most recent …
KevinTheGray Aug 17, 2018
1893e78
fixed analyzer issues in flutter_markdown_test
KevinTheGray Aug 17, 2018
0bb9a54
Updated changelog description
KevinTheGray Aug 20, 2018
5387b0f
changelog fix
KevinTheGray Aug 20, 2018
1d75ee9
updated mockito to version 3.0.0 final
KevinTheGray Aug 20, 2018
9a30a00
Merge pull request #56 from KevinTheGray/master
mit-mit Aug 21, 2018
598dd12
Update pubspec.yaml
mit-mit Aug 21, 2018
a76aba2
Update CHANGELOG.md
mit-mit Aug 21, 2018
265676f
Merge pull request #57 from flutter/mit-mit-patch-1
mit-mit Aug 21, 2018
88092c0
Support Uri data scheme
trieutritam Sep 5, 2018
0881271
Remove blank lines and reformat else statements
trieutritam Sep 26, 2018
5338fc0
Merge pull request #61 from trieutritam/support-uri-data-scheme
Hixie Oct 16, 2018
d08add7
Moved flutter_markdown files to packages/flutter_markdown
kf6gpe Dec 10, 2018
02163cd
Merge branch 'flutter_markdown' into add-flutter_markdown
kf6gpe Dec 10, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions packages/flutter_markdown/.cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
container:
image: cirrusci/flutter:latest

test_task:
pub_cache:
folder: ~/.pub-cache
upgrade_script:
- flutter channel master
- flutter upgrade
test_script: flutter test

analyze_task:
pub_cache:
folder: ~/.pub-cache
upgrade_script:
- flutter channel master
- flutter upgrade
analyze_script: flutter analyze
15 changes: 15 additions & 0 deletions packages/flutter_markdown/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.DS_Store
.atom/
.idea
.packages
.dart_tool/
.pub/
ios/.generated/
ios/Flutter/Generated.xcconfig
ios/Runner/GeneratedPluginRegistrant.*
packages
pubspec.lock

# Visual Studio Code related
.vscode/
.history/
7 changes: 7 additions & 0 deletions packages/flutter_markdown/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
os: linux
before_script:
- git clone https://github.com/flutter/flutter.git --depth 1
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
- flutter doctor
script:
- flutter test
43 changes: 43 additions & 0 deletions packages/flutter_markdown/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## 0.2.0

* Updated environment sdk constraints to make the package
Dart 2 compatible. As a result, usage of this version and higher
requires a Dart 2 SDK.

## 0.1.6

* Updated `markdown` dependency.

## 0.1.5

* Add `mockito` as a dev dependency. Eliminate use of `package:http`, which
is no longer part of Flutter.

## 0.1.4

* Add `li` style to bullets

## 0.1.3

* Add `path` and `http` as declared dependencies in `pubspec.yaml`

## 0.1.2

* Add support for horizontal rules.
* Fix the `onTap` callback on images nested in hyperlinks

## 0.1.1

* Add support for local file paths in image links. Make sure to set the
`imageDirectory` property to specify the base directory containing the image
files.

## 0.1.0

* Roll the dependency on `markdown` to 1.0.0
* Add a test and example for image links
* Fix the `onTap` callback on hyperlinks

## 0.0.9

* First published version
27 changes: 27 additions & 0 deletions packages/flutter_markdown/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright 2017 Google, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 changes: 37 additions & 0 deletions packages/flutter_markdown/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Flutter Markdown
[![pub package](https://img.shields.io/pub/v/flutter_markdown.svg)](https://pub.dartlang.org/packages/flutter_markdown)
[![Build Status](https://travis-ci.org/flutter/flutter_markdown.svg?branch=master)](https://travis-ci.org/flutter/flutter_markdown)


A markdown renderer for Flutter. It supports the
[original format](https://daringfireball.net/projects/markdown/), but no inline
html.

## Getting Started

Using the Markdown widget is simple, just pass in the source markdown as a
string:

new Markdown(data: markdownSource);

If you do not want the padding or scrolling behavior, use the MarkdownBody
instead:

new MarkdownBody(data: markdownSource);

By default, Markdown uses the formatting from the current material design theme,
but it's possible to create your own custom styling. Use the MarkdownStyle class
to pass in your own style. If you don't want to use Markdown outside of material
design, use the MarkdownRaw class.

## Image support

The `Img` tag only supports the following image locations. It specifically
does not support image locations referring to bundled assets.

* From the network: Use a URL prefixed by either `http://` or `https://`.

* From local files on the device: Use an absolute path to the file, for example by
concatenating the file name with the path returned by a known storage location,
such as those provided by the [`path_provider`](https://pub.dartlang.org/packages/path_provider)
plugin.
57 changes: 57 additions & 0 deletions packages/flutter_markdown/example/example.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:flutter_markdown/flutter_markdown.dart';

const String _markdownData = """# Markdown Example
Markdown allows you to easily include formatted text, images, and even formatted Dart code in your app.

## Styling
Style text as _italic_, __bold__, or `inline code`.

- Use bulleted lists
- To better clarify
- Your points

## Links
You can use [hyperlinks](hyperlink) in markdown

## Images

You can include images:

![Flutter logo](https://flutter.io/images/flutter-mark-square-100.png#100x100)

## Markdown widget

This is an example of how to create your own Markdown widget:

new Markdown(data: 'Hello _world_!');

## Code blocks
Formatted Dart code looks really pretty too:

```
void main() {
runApp(new MaterialApp(
home: new Scaffold(
body: new Markdown(data: markdownData)
)
));
}
```

Enjoy!
""";

void main() {
runApp(new MaterialApp(
title: "Markdown Demo",
home: new Scaffold(
appBar: new AppBar(title: const Text('Markdown Demo')),
body: const Markdown(data: _markdownData)
)
));
}
17 changes: 17 additions & 0 deletions packages/flutter_markdown/flutter_markdown.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/example/packages" />
<excludeFolder url="file://$MODULE_DIR$/packages" />
<excludeFolder url="file://$MODULE_DIR$/test/packages" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>
10 changes: 10 additions & 0 deletions packages/flutter_markdown/lib/flutter_markdown.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/// A library to render markdown formatted text.
library flutter_markdown;

export 'src/builder.dart';
export 'src/style_sheet.dart';
export 'src/widget.dart';
Loading