widget_tray 0.0.4 widget_tray: ^0.0.4 copied to clipboard
A Flutter package with a collection of custom widgets to streamline UI design and simplify app development.
import 'package:flutter/material.dart';
import 'package:widget_tray/widget_tray.dart';
void main() {
runApp(const MainApp());
}
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Container(
color: Colors.blue,
child: const ExpansionListExample(),
),
),
);
}
}
class ExpansionListExample extends StatelessWidget {
const ExpansionListExample({
super.key,
});
@override
Widget build(BuildContext context) {
return CustomExpandableTile(
enableAnimation: true,
title: 'Expandable Tile',
icon: Icons.expand,
children: [
CustomExpandableTile(
title: 'Sub Tile',
icon: Icons.expand,
children: [],
),
ListTile(
title: Text('Home'),
leading: Icon(Icons.home),
),
ListTile(
title: Text('Profile'),
leading: Icon(Icons.person),
),
ListTile(
title: Text('Settings'),
leading: Icon(Icons.settings),
),
CustomExpandableTile(
icon: Icons.expand,
title: 'Expandable Tile',
onTap: () {
},
)
],
);
}
}