smart_seat_selector 0.1.0 copy "smart_seat_selector: ^0.1.0" to clipboard
smart_seat_selector: ^0.1.0 copied to clipboard

A universal grid-based seat selection widget for Flutter supporting Cinemas, Buses, Flights, and Event halls with zoom and pan interaction.

0.1.0 #

First major feature release — bug fixes, UI/UX upgrades, and multi-seat-type support, all in one release.

Bug Fixes #

  • Grid immutability: SeatController now deep-copies the grid on construction. External mutations to the original list no longer silently corrupt controller state.
  • Grid validation: Constructor throws a descriptive ArgumentError if the grid is empty, has jagged rows (unequal column counts), or contains invalid cell values.
  • Dispose pattern: SeatController.dispose() is now properly overridden, calling super.dispose() and clearing internal state to prevent memory leaks.
  • selectedSeats is now unmodifiable: Returns Set.unmodifiable(...) so external code cannot mutate selection state directly.

New Features — Multi-seat type support #

  • SeatType enum: four built-in seat classes — economy, business, vip, wheelchair.
  • SeatMeta model: each grid cell now carries a SeatState, a SeatType, and an optional id string for backend round-tripping.
  • TypedSeatGrid typedef: List<List<SeatMeta>> — the new recommended grid format.
  • Seat factory class: concise helpers — Seat.gap(), Seat.economy(), Seat.business(booked: true), Seat.vip(), Seat.wheelchair(), Seat.gridFromInts() for migrating legacy integer grids.
  • SeatTypeConfig: per-type visual + pricing config — label, price, currencySymbol, availableColor, bookedColor, selectedColor, selectionBorderColor, shape, icon, iconOnly.
    • Four built-in presets: SeatTypeConfig.defaultEconomy, .defaultBusiness, .defaultVip, .defaultWheelchair.
  • SeatShape enum: roundedRect (default), circle (wheelchair), stadium (VIP pill).
  • SeatLayoutConfig.typeConfigs: map of SeatType → SeatTypeConfig, pre-populated with all four presets. Color/shape resolution is type-aware via getColor(state, type), getSelectionBorderColor(type), getShape(type), getBorderRadius(type).
  • SeatController.totalPrice getter: sums prices for all selected seats using the prices map passed to the constructor. Also exposes totalPriceFormatted.
  • SeatController.fromInts() factory: drop-in migration path for legacy List<List<int>> grids — all seats default to SeatType.economy.
  • Programmatic control API: selectSeats(), selectRow(), selectByType(), selectAll(), clearSelection(), selectedCount, isMaxReached.

New Features — Layout & headers #

  • Row & column headers: SeatLayoutConfig gains showRowLabels and showColLabels flags. Renders A–Z row letters on the left and 1–N column numbers across the top, automatically skipping gap/aisle columns so numbering stays aligned.
  • labelBuilder callback: SeatLayout accepts an optional labelBuilder(row, col) for custom seat labels (numeric, backend IDs, etc.) instead of the default A1/B2 format.

New Features — Tooltip #

  • Seat tooltip / info popup: long-pressing any seat shows a small overlay card with the seat label, type name, status (Available/Booked/Selected/Unavailable), and price — fully type-aware. Auto-dismisses after 2 seconds. Controlled via SeatLayoutConfig.showTooltip.

UI & UX Upgrades #

  • Selection animations: SeatItem bounces (scale animation) on selection/deselection and shows an ink ripple on tap. Toggle via SeatLayoutConfig.enableAnimations.
  • Type-aware rendering: seats render with the correct color, border radius, and shape per type — rounded rect, circle (wheelchair), or stadium/pill (VIP). Supports icon-only and icon+label rendering.
  • SeatLegend widget: auto-renders color swatches for each configured seat type (with icon and shape) plus Booked/Unavailable/Selected states — always stays in sync with your SeatLayoutConfig. Supports horizontal and vertical layouts.
  • SeatSummaryBar widget: live sticky bottom bar showing selected seat count, seat labels, animated total price, and a confirm button. Updates automatically via AnimatedBuilder.

Breaking changes #

  • SeatController constructor now takes a TypedSeatGrid instead of List<List<int>>. Use SeatController.fromInts() for the legacy signature.
  • SeatLayoutConfig.getColor() now takes an optional SeatType second argument (defaults to SeatType.economy, so old calls still compile).

0.0.7 #

  • Fixed grid mistake in README.md.

0.0.6 #

  • Feature: Added support for disabled seat state (Value 3 in grid).
  • Fix: Resolved an issue where SeatController would notify listeners twice during selection updates, causing double rebuilds.
  • Optimization: Replaced Container with AnimatedContainer in SeatItem for smoother selection transitions.
  • Docs: Updated README.md with clearer installation instructions and updated configuration table.

0.0.5 #

  • Fixed dependencies mistake in README.md.

0.0.4 #

  • Breaking Change: Renamed SeatLayoutWidget to SeatLayout for cleaner usage.
  • Added full API documentation for SeatLayout, SeatController, and SeatLayoutConfig.
  • Updated example app with better comments and structure.
  • Fixed static analysis scores (library names and formatting).

0.0.3 #

  • Improved License section formatting in README.md.

0.0.2 #

  • Fixed formatting issues in the README.md table.

0.0.1 #

  • Initial release of Smart Seat Selector.
  • Added support for Cinemas, Buses, and Events.
  • Added Zoom, Pan, and Multi-select features.
2
likes
160
points
105
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A universal grid-based seat selection widget for Flutter supporting Cinemas, Buses, Flights, and Event halls with zoom and pan interaction.

Repository (GitHub)
View/report issues

Topics

#booking #cinema #widget #seat-selector #seat-picker

License

MIT (license)

Dependencies

flutter

More

Packages that depend on smart_seat_selector