demo.dart 991 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// 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

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

21 22 23
## Code blocks
Formatted Dart code looks really pretty too. This is an example of how to create your own Markdown widget:

24
    new Markdown(data: 'Hello _world_!');
25 26 27 28 29 30 31

Enjoy!
""";

void main() {
  runApp(new MaterialApp(
    title: "Markdown Demo",
32 33 34 35
    home: new Scaffold(
      appBar: new AppBar(title: new Text('Markdown Demo')),
      body: new Markdown(data: _kMarkdownData)
    )
36 37
  ));
}