simple_ticket_widget 1.0.1
simple_ticket_widget: ^1.0.1 copied to clipboard
A simple ticket widget to display it vertically or horizontally.
Simple Ticket Widget #
A simple, ticket-style clipper widget for your Flutter project that supports both horizontal and vertical orientations, with built-in shadow effect and corner radius.


Getting started #
Add the dependency to pubspec.yaml
dependencies:
simple_ticket_widget: ^1.0.0
Import the package.
import 'package:simple_ticket_widget/simple_ticket_widget.dart';
Use the widget in your code.
SimpleTicketWidget(
position: 50,
arcRadius: 20,
direction: Axis.horizontal,
child: Container(
color: Colors.green,
height: 200,
width: 350,
alignment: Alignment.center,
child: Text('Ticket Clipper'),
),
),
Usage #
Parameter | Default | Description |
---|---|---|
arcRadius | 16.0 | The circular arc radius of ticket. |
direction | Axis.vertical | The direction of the ticket widget arc. |
position | 100 | The position of the arc based on direction. |
borderRadius | BorderRadius.zero | The corner radius of the ticket. |
shadowColor | Colors.black | The shadow color of the ticket. |
blurRadius | 4.0 | The shadow blur radius. |
Example #
The sample code can be found under the example
package.
You can try changing all parameters.