widget_tray 0.0.8 copy "widget_tray: ^0.0.8" to clipboard
widget_tray: ^0.0.8 copied to clipboard

A Flutter package with a collection of custom widgets to streamline UI design and simplify app development.

example/lib/main.dart

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 StatefulWidget {
  const ExpansionListExample({
    super.key,
  });

  @override
  State<ExpansionListExample> createState() => _ExpansionListExampleState();
}

class _ExpansionListExampleState extends State<ExpansionListExample> {
  bool isSelected = false;
  @override
  Widget build(BuildContext context) {
    return CustomExpandableTile(
      title: 'Expandable Tile',
      icon: Icons.expand,
      children: [
        const CustomExpandableTile(
          isSelected: true,
          title: 'Sub Tile',
          icon: Icons.expand,
          children: [],
        ),
        const ListTile(
          title: Text('Home'),
          leading: Icon(Icons.home),
        ),
        const ListTile(
          title: Text('Profile'),
          leading: Icon(Icons.person),
        ),
        const ListTile(
          title: Text('Settings'),
          leading: Icon(Icons.settings),
        ),
        CustomExpandableTile(
          icon: Icons.expand,
          title: 'Expandable Tile',
          isSelected: true,
          onTap: () {},
        ),
        CustomExpandableTile(
          isSelected: isSelected,
          icon: Icons.expand,
          title: 'fals',
          onTap: () {
            setState(() {
              isSelected = !isSelected;
            });
          },
        )
      ],
    );
  }
}
1
likes
0
points
578
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package with a collection of custom widgets to streamline UI design and simplify app development.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on widget_tray