seat_kit 0.2.0 copy "seat_kit: ^0.2.0" to clipboard
seat_kit: ^0.2.0 copied to clipboard

A Flutter toolkit for modeling, rendering, and selecting seats on interactive seat maps for events and venues.

example/lib/main.dart

/// seat_kit example app.
///
/// Demonstrates the full public API of `package:seat_kit/seat_kit.dart`:
///
/// * Four built-in template generators ([theaterGrid], [busLayout],
///   [restaurantTables], [gaSection]).
/// * Custom-JSON loading via [SeatMap.fromJson] (assets/maps/balcony.json).
/// * Interactive rendering with [SeatMapView] (pan, pinch-zoom, tap-to-select).
/// * Live selection feedback via [SeatMapView.onSelectionChanged].
/// * Rejection feedback (snackbars) via [SeatMapView.onTapResult].
/// * Status legend showing every [SeatStatus] color.
/// * "Clear selection" via [seatSelectionControllerProvider].
///
/// This file only imports [package:seat_kit/seat_kit.dart] (the public barrel)
/// and [package:flutter_riverpod/flutter_riverpod.dart] — no src/ imports.
library;

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

import 'demo_page.dart';

void main() {
  runApp(const SeatKitExampleApp());
}

class SeatKitExampleApp extends StatelessWidget {
  const SeatKitExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return ProviderScope(
      // ProviderScope is required by flutter_riverpod and must wrap every
      // widget that uses `ref` (including SeatMapView itself).
      child: MaterialApp(
        title: 'seat_kit demo',
        debugShowCheckedModeBanner: false,
        theme: ThemeData(
          colorScheme: ColorScheme.fromSeed(seedColor: const Color(0xFF1565C0)),
          useMaterial3: true,
        ),
        home: const DemoPage(),
      ),
    );
  }
}
1
likes
160
points
6
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter toolkit for modeling, rendering, and selecting seats on interactive seat maps for events and venues.

Repository (GitHub)
View/report issues

Topics

#seat-map #booking #widget #canvas #riverpod

License

MIT (license)

Dependencies

flutter, flutter_riverpod, freezed_annotation, json_annotation, riverpod_annotation

More

Packages that depend on seat_kit