Adds initial version of Markdown renderer

This commit is contained in:
Viktor Lidholt
2016-02-25 14:47:05 -08:00
parent b193854bfd
commit 48c7a04f1f
10 changed files with 940 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
// 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 _kMarkdownData = """# 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
## Code blocks
Formatted Dart code looks really pretty too. This is an example of how to create your own Markdown widget:
new Markdown(data: "Hello _world_!");
Enjoy!
""";
void main() {
runApp(new MaterialApp(
title: "Markdown Demo",
routes: <String, RouteBuilder>{
'/': (RouteArguments args) => new Scaffold(
toolBar: new ToolBar(center: new Text("Markdown Demo")),
body: new Markdown(data: _kMarkdownData)
)
}
));
}