expansion_card 0.1.0 copy "expansion_card: ^0.1.0" to clipboard
expansion_card: ^0.1.0 copied to clipboard

Expansion Card that expands on click with full body cover background that also expands ontap. This widget is highly customizable with smooth animations.

example/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(home: MainApp());
  }
}

class MainApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Colors.grey,
        body: Center(
            child: ExpansionCard(
          borderRadius: 20,
          background: Image.asset(
            "images/planets.gif",
            fit: BoxFit.cover,
          ),
          title: Container(
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: <Widget>[
                Text(
                  "Header",
                  style: TextStyle(
                    fontSize: 30,
                    color: Colors.black,
                  ),
                ),
                Text(
                  "Sub",
                  style: TextStyle(fontSize: 20, color: Colors.black),
                ),
              ],
            ),
          ),
          children: <Widget>[
            Container(
              margin: EdgeInsets.symmetric(horizontal: 7),
              child: Text("Content goes over here !",
                  style: TextStyle(fontSize: 20, color: Colors.black)),
            )
          ],
        )));
  }
}
copied to clipboard
302
likes
20
points
122
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.23 - 2025.04.07

Expansion Card that expands on click with full body cover background that also expands ontap. This widget is highly customizable with smooth animations.

License

unknown (license)

Dependencies

flutter

More

Packages that depend on expansion_card