Skip to content

Latest commit

 

History

History
44 lines (38 loc) · 1.46 KB

README.md

File metadata and controls

44 lines (38 loc) · 1.46 KB

Spoiler Actions Status

Spoiler widget for flutter.

HowTo:

child: Spoiler(openCurve: Curves.elasticOut,
               closeCurve: Curves.elasticIn,
               headerWhenSpoilerClosed: Text("Tools", style: TextStyle(color: Colors.white)),
               child: GameControl())
child: Spoilers(
         onUpdateCallback: (s) {
           print(s.childHeight);
           print(s.isOpened);
         },
         header: Text("Spoilers example header"),
         children: <Spoiler>[
           Spoiler(
             headerWhenSpoilerClosed: Text('First spoiler'),
               child: Text('Firsdt example context'),
           ),
           Spoiler(
             headerWhenSpoilerClosed: Text('Second spoiler'),
               child: Text('Second example context'),
           ),
         ],
       )

Spoiler preview gif

TODO:

  • Custom header.
  • Custom open header and custom close header.
  • On open callback with header height and child height arguments.
  • On close callback with header height and child height arguments.
  • Get only header height for spoiler in spoiler widgets.
  • Make Spoilers widget with callback that has all headers height and all child height.
  • Add reverse parameter for change order of header and child.
  • Add horizontal spoiler widget.