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)),
            )
          ],
        )));
  }
}
304
likes
20
pub points
86%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on expansion_card