simple_ticket_widget 1.0.1

SDKflutter
Platformandroidioswindowslinuxmacosweb

A simple ticket widget to display it vertically or horizontally.

Simple Ticket Widget

pub package

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

ParameterDefaultDescription
arcRadius16.0The circular arc radius of ticket.
directionAxis.verticalThe direction of the ticket widget arc.
position100The position of the arc based on direction.
borderRadiusBorderRadius.zeroThe corner radius of the ticket.
shadowColorColors.blackThe shadow color of the ticket.
blurRadius4.0The shadow blur radius.

Example

The sample code can be found under the example package. You can try changing all parameters.