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

Flutter package for integrating TicketKO widgets into Flutter apps.

TicketKO Widgets #

Flutter package for integrating TicketKO widgets into Flutter apps.

Features #

This package provides four types of TicketKO widgets for different event ticketing scenarios:

  • AuditoriumlessEventTicketsWidget - For events without specific seating arrangements
  • AuditoriumEventTicketsWidget - For events with auditorium seating and seat selection
  • TicketKOTimePeriodEventsWidget - For events that occur over a specific time period
  • StandaloneTicketsAndVouchersWidget - For standalone tickets and vouchers
  • CatalogueWidget - For displaying event catalogues

All widgets support:

  • Production and test environments
  • Multi-language support
  • Event callbacks for ticket order updates
  • Responsive web-based interface through WebView

Getting started #

Prerequisites #

  • Flutter SDK
  • Dart 3.5.0 or higher

Usage #

Basic Implementation #

Import the package:

import 'package:ticketko_widgets/ticketko_widgets.dart';

Auditoriumless Event Tickets #

AuditoriumlessEventTicketsWidget(
  widgetId: "your-widget-id",
  language: "en",
  environment: TicketKOEnvironment.test, // or TicketKOEnvironment.production
  onTicketOrderUpdated: (data) {
    // Handle ticket order updates
    print('Order updated: ${data['id']}');
  },
)

Auditorium Event Tickets #

AuditoriumEventTicketsWidget(
  widgetId: "your-widget-id",
  language: "en",
  environment: TicketKOEnvironment.production,
  onTicketOrderUpdated: (data) {
    // Handle ticket order updates
    ScaffoldMessenger.of(context).showSnackBar(
      SnackBar(content: Text('Order updated: ${data['id']}')),
    );
  },
)

Time Period Event Tickets #

TicketKOTimePeriodEventsWidget(
  widgetId: "your-widget-id",
  language: "en",
  environment: TicketKOEnvironment.test,
  onTicketOrderUpdated: (data) {
    // Handle ticket order updates
  },
)

Standalone Tickets and Vouchers #

StandaloneTicketsAndVouchersWidget(
  widgetId: "your-widget-id",
  language: "en",
  environment: TicketKOEnvironment.test,
  onTicketOrderUpdated: (data) {
    // Handle ticket order updates
  },
)

Catalogue Widget #

CatalogueWidget(
  widgetId: "your-widget-id",
  language: "en",
  environment: TicketKOEnvironment.production,
  onTicketOrderUpdated: (data) {
    // Handle ticket order updates
  },
)

Complete Example #

import 'package:flutter/material.dart';
import 'package:ticketko_widgets/ticketko_widgets.dart';

class TicketPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('Event Tickets')),
      body: AuditoriumlessEventTicketsWidget(
        widgetId: "your-widget-id",
        language: "en",
        environment: TicketKOEnvironment.test,
        onTicketOrderUpdated: (data) {
          // Handle the ticket order update
          ScaffoldMessenger.of(context).showSnackBar(
            SnackBar(
              content: Text('Ticket order updated: ${data['id']}'),
            ),
          );
        },
      ),
    );
  }
}

Parameters #

Required Parameters #

  • widgetId (String) - Your unique TicketKO widget identifier
  • language (String) - Language code for the widget interface
  • environment (TicketKOEnvironment) - Either TicketKOEnvironment.test or TicketKOEnvironment.production

Optional Parameters #

  • onTicketOrderUpdated (Function) - Callback function triggered when ticket orders are updated

Environment #

  • Test Environment: Use TicketKOEnvironment.test for development and testing
  • Production Environment: Use TicketKOEnvironment.production for live applications

Dependencies #

This package uses webview_flutter to display the TicketKO widgets. Make sure your app meets the WebView requirements for your target platforms.

1
likes
145
points
19
downloads

Documentation

API reference

Publisher

verified publisherkupujonline.com

Weekly Downloads

Flutter package for integrating TicketKO widgets into Flutter apps.

Homepage

License

BSD-3-Clause (license)

Dependencies

flutter, webview_flutter

More

Packages that depend on ticketko_widgets