Skip to main content

accordion_mnml 1.1.0 copy "accordion_mnml: ^1.1.0" to clipboard
accordion_mnml: ^1.1.0 copied to clipboard

A minimal Accordion widget with smooth opening animations. And Platform Independent UI Packages.

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Accordion Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
      ),
      home: const MyHomePage(title: 'Accordion Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});
  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: SingleChildScrollView(
        child: Column(
          children: [
            AccordionMnmlWrapper(
              isOneAtATime: false,
              items: [
                AccordionMnmlItem(
                  title: 'With Prefix Icon',
                  headerPrefixIcon: const Icon(Icons.leaderboard, size: 12),
                  child: const Text('Content for item 1'),
                ),
                AccordionMnmlItem(
                  title: 'Custom Background',
                  backgroundColor: Colors.amber,
                  child: const Text('Content for item 2'),
                ),
                AccordionMnmlItem(
                  title: 'Custom Shadow & Divider',
                  dividerColor: Colors.red.shade200,
                  boxShadows: [
                    BoxShadow(
                      color: Colors.red.withValues(alpha: 0.12),
                      blurRadius: 10,
                      offset: const Offset(10, 10),
                    ),
                  ],
                  child: const Text('Content for item 3'),
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}
0
likes
160
points
88
downloads

Documentation

API reference

Publisher

verified publishervenx.site

Weekly Downloads

A minimal Accordion widget with smooth opening animations. And Platform Independent UI Packages.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on accordion_mnml