flutter_tree 1.0.0 copy "flutter_tree: ^1.0.0" to clipboard
flutter_tree: ^1.0.0 copied to clipboard

outdated

Flutter tree widget.

example/main.dart

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

import 'tree_data.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Tree example',
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(title: Text('Flutter Tree')),
        // body: TreeView(
        //   data: treeData,
        //   titleOnTap: () {
        //     print('title');
        //   },
        //   leadingOnTap: () {
        //     print('leading');
        //   },
        //   trailingOnTap: () {
        //     print('trailing');
        //   },
        // ),

        body: TreeNode(
          title: Text('This is a title!'),
          children: [
            TreeNode(
              title: Text('This is a title!'),
              children: <Widget>[
                TreeNode(title: Text('This is a title!')),
                TreeNode(
                  title: Text('This is a title!'),
                  children: <Widget>[
                    TreeNode(title: Text('This is a title!')),
                    TreeNode(title: Text('This is a title!')),
                    TreeNode(title: Text('This is a title!')),
                  ],
                ),
                TreeNode(title: Text('This is a title!')),
                TreeNode(title: Text('This is a title!')),
                TreeNode(
                  title: Text('This is a title!'),
                  children: <Widget>[
                    TreeNode(title: Text('This is a title!')),
                    TreeNode(title: Text('This is a title!')),
                    TreeNode(title: Text('This is a title!')),
                  ],
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}
96
likes
0
points
90
downloads

Publisher

verified publishercoldstone.fun

Weekly Downloads

Flutter tree widget.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_tree