interactional_canvas 0.0.2 interactional_canvas: ^0.0.2 copied to clipboard
The flutter package that operating interactive canvas.
Interactional Canvas #
A Flutter package that provides interactional canvas, which can add nodes and manipulating nodes in a InteractiveViewer.
Usage #
To use this package, add interactional_canvas
as a dependency in your pubspec.yaml file.
Sample Usage #
- You can now add a
InteractionalCanvas
widget to your widget tree.
class Demo extends StatefulWidget {
const Demo({Key? key}) : super(key: key);
static const title = 'amap_flutter_example';
@override
State<Demo> createState() => _DemoState();
}
class _DemoState extends State<Demo> {
late CanvasController controller;
@override
void initState() {
super.initState();
controller = CanvasController();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text(Demo.title),
),
body: InteractionalCanvas(
controller: controller,
),
);
}
}
See the example
directory for a complete sample app.