0 purchases
anbocas tickets ui
Anbocas Tickets UI #
Anbocas Tickets UI is a Flutter plugin designed to provide a seamless ticket booking system, allowing users to select tickets, add user details, purchase tickets, and manage their bookings. The plugin is built with flexibility and ease of use in mind, making it a powerful tool for integrating ticket management into your Flutter applications.
Features #
Ticket Booking Flow
Ticket Management
Custom Themes Option.
Booking Success Listener.
Getting Started #
Prerequisites #
** Before using the plugin, you'll need to obtain an API key. To get an API key**
Installing
Add anbocas_tickets_ui to your pubspec.yaml file:
dependencies:
anbocas_tickets_ui: ^0.0.1
copied to clipboard
Then run,
dependencies:
flutter pub get
Usage #
Initial Setup #
Before making any API calls, you need to configure the plugin with your API key and any other required settings. This should be done at the start of your application:
import 'package:anbocas_tickets_ui/anbocas_tickets_ui.dart';
@override
void didChangeDependencies() {
AnbocasTickets.instance.config(
apikey: 'YOUR_API_KEY',
customThemeConfig: AnbocasCustomTheme(
// Add your custom theme configurations here
),
);
super.didChangeDependencies();
}
copied to clipboard
Launching the Ticket Booking Flow #
To start the ticket booking process, use the launchBookingFlow method:
import 'package:anbocas_tickets_ui/anbocas_tickets_ui.dart';
AnbocasTickets.instance.launchBookingFlow(
eventId: 'EVENT_ID',
context: context,
allowGroupTicket: true,
userMetaData: UserConfig(
name: "User Name",
email: "[email protected]",
phone: "1234567890",
countryCode: "+1",
),
);
copied to clipboard
Managing Tickets #
To manage or view existing tickets for an event, use the manageTickets method:
import 'package:anbocas_tickets_ui/anbocas_tickets_ui.dart';
AnbocasTickets.instance.manageTickets(
eventId: 'EVENT_ID',
context: context,
);
copied to clipboard
Listening to Booking Events #
You can listen to the booking success event using the AnbocasEventManager:
import 'package:anbocas_tickets_ui/anbocas_tickets_ui.dart';
final anbocas = AnbocasEventManager();
@override
void initState() {
anbocas.on(AnbocasEventManager.EVENT_BOOKING_SUCCESS, handleBookingSuccess);
super.initState();
}
@override
void dispose() {
anbocas.clear();
super.dispose();
}
void handleBookingSuccess(data) {
print("Booking was successful:");
print(data.toString());
}
copied to clipboard
License #
This project is licensed under the MIT License - see the LICENSE file for details.
Support #
For any issues or to request an API key, please contact [[email protected]]: https://github.com/forwardcodetechstudio/anbocas_tickets_flutter_plugin
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.