Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

expand widget

this dart package offers developers a streamlined library of flutter widgets, useful for expanding widgets and text views, when users interact with them.

there are two main ‘expand’ widgets:

  • expand child: useful to show more widgets related to the content already visible by the user.
  • expand text: useful when texts can be quite big for a certain screen. it adds the ability to show the full content when the user wants to.


features

  • the expandarrowstyle parameter allows you to select various render options, related to the expand arrow itself.

  • hide the arrow widget when the view is being expanded, using the hidearrowonexpanded parameter.
  • custimze the arrow widget itself: color, size, padding, icon…

  • you can also provide your own widget for the expand indicator, using the indicatorbuilder for both expaning widgets.
  • use custom expanding hint strings! by default, it will use the ones provided by materiallocalizations.
  • expand text view with swipe-down gestures, using the expandongesture, which by default is set to false.
  • you can also customize expand animation duration and curve easilly.

example

here is an example of a simple use of this package, featuring the expandchild & expandtext widgets.

if you want to take a deeper look at the example, take a look at the example folder provided with the project.

  • expandchild
expandchild(
  child: column(
    children: <widget>[
      outlinebutton(
        child: text('button1'),
        onpressed: () => print('pressed button1'),
      ),
      outlinebutton(
        child: text('button2'),
        onpressed: () => print('pressed button2'),
      ),
      outlinebutton(
        child: text('button3'),
        onpressed: () => print('pressed button3'),
      ),
    ],
  ),
),
  • expandtext
expandtext(
  'lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
  textalign: textalign.justify,
),

getting started

this project is a starting point for a dart package, a library module containing code that can be shared easily across multiple flutter or dart projects.

for help getting started with flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full api reference.

built with

authors

  • jesús rodríguez

Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Comments are closed.