flutter_knap 2026.9.25 copy "flutter_knap: ^2026.9.25" to clipboard
flutter_knap: ^2026.9.25 copied to clipboard

Flutter widgets and real-time preview tools for the Knap template engine.

Flutter Knap #

Flutter widgets and real-time Markdown preview tools for the Knap template engine.

Features #

  • KnapMarkdownView: Directly render Knap templates and JSON data into rich, styled Markdown with flutter_markdown.
  • KnapBuilder: Build custom widgets dynamically based on Knap template state and compilation results.
  • KnapTemplateController: Reactive ChangeNotifier providing real-time re-rendering when templates or data change, with built-in syntax error diagnostics.

Getting Started #

Add flutter_knap to your pubspec.yaml:

dependencies:
  flutter_knap: ^2026.9.25

Usage Example #

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

class NotePreviewScreen extends StatelessWidget {
  const NotePreviewScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Live Note Preview')),
      body: const Padding(
        padding: EdgeInsets.all(16.0),
        child: KnapMarkdownView(
          template: '''
# {{ title | trim }}

> [!NOTE] Quick Info
> {{ summary }}

## Tags
{{ tags | list }}
''',
          data: {
            'title': 'Captured Article',
            'summary': 'Extracted via Knap template in Flutter.',
            'tags': ['flutter', 'knap', 'markdown'],
          },
        ),
      ),
    );
  }
}
0
likes
130
points
78
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter widgets and real-time preview tools for the Knap template engine.

Repository (GitHub)
View/report issues

Topics

#markdown #template #flutter-widgets #obsidian #preview

License

MIT (license)

Dependencies

flutter, flutter_markdown, knap

More

Packages that depend on flutter_knap