user_command 0.0.5 copy "user_command: ^0.0.5" to clipboard
user_command: ^0.0.5 copied to clipboard

A generic user command class that can be used on multiple Command Widgets (with easy to use style classes).

user_command #

Command #

The Command class is a unified definition of a user command. A Command has a (dynamic):

  • name
  • action (code to execute when the user clicks on the command)
  • (optional) icon
  • (optional) visibility

Note that the Command class has no disabled state, because disabled buttons suck.

Command widgets #

Command's can be used in the following widgets:

  • CommandTextButton
  • CommandElevatedButton
  • CommandOutlinedButton
  • CommandPopupMenuItem (e.g. Within a CommandPopupMenu)
  • CommandPopupMenuButton
  • CommandPopupMenuWrapper
  • CommandToolbarButton (e.g. Within a CommandToolbar)
  • CommandTile (e.g. Within a CommandListView)
  • Etc...

Command widget styling #

These Command widgets all have a single style class that:

  • uses reasonable formatting defaults when no style parameters are given.
  • contains style parameters for all the formatting:
    • sizing
    • colors
    • fonts
    • padding
    • aligning
    • elevation
    • etc

Installation and usage #

See Installation and usage

Example #

See Example

2
likes
130
pub points
0%
popularity

Publisher

unverified uploader

A generic user command class that can be used on multiple Command Widgets (with easy to use style classes).

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, overflow_view

More

Packages that depend on user_command