nodeline 0.1.0 copy "nodeline: ^0.1.0" to clipboard
nodeline: ^0.1.0 copied to clipboard

The open-source tldraw alternative for building infinite canvas apps in Flutter.

example/lib/main.dart

import 'package:flutter/widgets.dart';
import 'package:nodeline/nodeline.dart';

void main() {
  runApp(const NodelineExampleApp());
}

/// A minimal nodeline example: an infinite canvas with the editing toolbar.
///
/// The [FlowDraw] widget wires up the canvas BLoCs and the app shell, so all
/// you need to do is drop a [FlowDrawCanvas] inside it. The [FlowDrawToolbar]
/// is overlaid on top to provide the shape, arrow, text and drawing tools.
class NodelineExampleApp extends StatelessWidget {
  const NodelineExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const FlowDraw(
      child: Stack(
        children: [
          FlowDrawCanvas(),
          Align(
            alignment: Alignment.topCenter,
            child: Padding(
              padding: EdgeInsets.only(top: 24),
              // Pass SVG asset paths here to enable the SVG-stamp tool.
              child: FlowDrawToolbar(svgs: []),
            ),
          ),
        ],
      ),
    );
  }
}
0
likes
0
points
13
downloads

Publisher

unverified uploader

Weekly Downloads

The open-source tldraw alternative for building infinite canvas apps in Flutter.

Repository (GitHub)
View/report issues

Topics

#diagram #canvas #whiteboard #drawing #tldraw

License

unknown (license)

Dependencies

bloc, collection, equatable, flutter, flutter_bloc, flutter_shaders, flutter_svg, http, keymap, perfect_freehand, shadcn_flutter, shared_preferences, url_launcher, uuid, vector_graphics

More

Packages that depend on nodeline