VxTicket

Draws a ticket that represents a shape

Use VxTicket() or .ticket() to draw a ticket shape.

Ticket sample photo

A movie ticket like shape.

VxTicket(
width: 150,
height: 70,
isTwoSided: true,
backgroundColor: Colors.pink,
)

Extension

.ticket(
width: 150,
height: 70,
isTwoSided: true,
backgroundColor: Colors.pink,
)

Properties

Prop (Type)DefaultDescription
backgroundColor (Color)ThemeData.primaryColorLight or Themedata.primarycolordarkThe color to fill the ticket
child (Widget)Any child widget
width (double)MediaQuery.of(context).size.shortestSide / 2Width of the ticket
height (double)MediaQuery.of(context).size.shortestSide / 4Height of the ticket
isTwoSided (bool)falseTicket style both sides
isHardEdged (bool)falseThe ticket type is by default curvish. If isHardEdged is true then it will be pointed edged.