
Flutter UI #35: Fun with the Tree View in Flutter
Updated: Mar 24

flutter_tree: ^1.1.0
import 'package:flutter/material.dart';
import 'package:flutter_tree/flutter_tree.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Tree',
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(title: const Center(child: Text('Flutter Tree'))),
body: const TreeNode(
title: Text('This is content!'),
children: [
TreeNode(
title: Text('This is content!'),
children: <Widget>[
TreeNode(title: Text('This is content!')),
TreeNode(
title: Text('This is title!'),
children: <Widget>[
TreeNode(title: Text('This is content!')),
TreeNode(title: Text('This is content!')),
TreeNode(title: Text('This is content!')),
],
),
TreeNode(title: Text('This is content!')),
TreeNode(title: Text('This is content!')),
TreeNode(
title: Text('This is content!'),
children: <Widget>[
TreeNode(title: Text('This is content!')),
TreeNode(title: Text('This is content!')),
TreeNode(title: Text('This is content!')),
],
),
],
),
],
),
),
);
}
}
#fluttertutorial #fluttertutorialforbeginners #flutterkicks #flutterfullcourse #flutterapp #flutterproject #fluttercourse #flutterappdevelopment #flutteranimation #flutterapi #flutterapptutorial #flutterapiintegration #flutterappproject #flutterbloc #flutterbasics #flutterbloctutorial #flutterbeginnertutorial #flutterbackend #flutterblocpattern #flutterbackgroundservice #fluttercrashcourse #fluttercompletetutorial #cookieswirlcfluttershydoll #flutterdevelopment #flutterdesktop #flutterdownload #flutterdesign #flutterdesktopapp #flutterdart #flutterd #flutterecommerceapp #flutterexplained