markdown_editable_textinput 0.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 68

Build Status codecov

markdown_editable_textinput #

MarkdownEditableTextInput is a TextField Widget that allow you to convert easily what's in the TextField to Markdown.

Features #

  • [x] Convert to Bold, Italic, Title (h1,h2,h3), List and Link
  • [ ] Customize textInput colors

Demo #

Usage #

The color of the MarkdownTextInput is defined by the color set in your Theme :

  • primaryColor: Cursor's color
  • accentColor: MarkdownTextInput's borders
  • cardColor: Background color of MarkdownTextInput

Attributes #

AttributesExample ValueDescription
Function onTextChangedCallback used to retrieve the text in parent's Widget
String initialValue"Lorem Ipsum"Display an initial value in MarkdownTextInput's field
Function validatorsAdd validators to the MarkdownTextInput
String label"Description"Display a label in MarkdownTextInput

Example #

You can see an example of how to use this package here

[0.0.2] - 2020/02/19 #

  • Remove unused dependency
  • Add more docs

[0.0.1] - 2020/01/31 #

  • Initialize project


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

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  _MyAppState createState() => _MyAppState();

class _MyAppState extends State<MyApp> {
  String description = 'My great package';

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Theme(
        data: ThemeData(
          primaryColor: const Color(0xFF2B3409),
          accentColor: const Color(0xFF71881B),
          cardColor: const Color(0xFFF7FBEA),
          textTheme: const TextTheme(body1: TextStyle(fontSize: 20)),
        child: Scaffold(
          appBar: AppBar(
            title: const Text('EditableTextInput'),
          body: SafeArea(
            child: Padding(
              padding: const EdgeInsets.symmetric(horizontal: 15),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.stretch,
                children: <Widget>[
                    (String value) => setState(() => description = value),
                    label: 'Description',
                    padding: const EdgeInsets.only(top: 10),
                    child: MarkdownBody(
                      data: description,

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  markdown_editable_textinput: ^0.0.2

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:markdown_editable_textinput/format_markdown.dart';
import 'package:markdown_editable_textinput/markdown_text_input.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Mar 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health suggestions

Format lib/format_markdown.dart.

Run flutter format to format lib/format_markdown.dart.

Format lib/markdown_text_input.dart.

Run flutter format to format lib/markdown_text_input.dart.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.2 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies