flutter_switch_device 0.3.0 copy "flutter_switch_device: ^0.3.0" to clipboard
flutter_switch_device: ^0.3.0 copied to clipboard

A Flutter widget that renders network switch devices with ports, fully programmatic — no SVG assets required.

0.3.0 #

  • Port selection (spotlight mode)selectedPorts, onPortSelected, and unselectedPortOpacity parameters on SwitchDeviceView. Multi-select support; unselected ports dim when any are selected; selected ports keep their float animation.
  • Directional hover animation — top-row (odd) ports float up, bottom-row (even) ports float down on hover, matching the two-row physical layout.
  • Stacked part deselect — re-tapping the active stacked switch body now deselects it (sets stackedPart to 0), showing both units at full opacity.
  • getPortPositions() offset — optional parentOffset parameter shifts all returned positions into the parent's coordinate space for topology line drawing.

0.2.0 #

  • Add SwitchIconWidget — a compact switch icon for topology views and device lists.
  • Add SwitchIconPainter — CustomPainter rendering a miniature switch with gradient body, 3 LEDs with glow, divider, and 2×8 port grid.
  • Width-driven sizing with 2.5:1 aspect ratio; three target sizes: 72px (plain), 68px (halo), 38px (compact).
  • Optional theme with auto-detection from Theme.of(context).brightness.
  • Material elevation via PhysicalShape.
  • Theme-aware port grid colors for visibility on both dark and light backgrounds.

0.1.0 #

  • Initial release.
  • Render network switch devices with 6–48 ports using Flutter's CustomPainter API.
  • 22 built-in presets: single-unit (6–28P) and stacked two-unit (30–48P).
  • Interactive ports with hover, tap callbacks, and status indicators (Up/Down/Unknown).
  • Auto-adaptive layout engine: single-row, two-row, and stacked layouts.
  • Dark and light theme support with automatic brightness detection.
  • Configuration mode for setup/editing scenarios.
  • Port position API for topology consumers.
0
likes
160
points
26
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter widget that renders network switch devices with ports, fully programmatic — no SVG assets required.

Repository (GitHub)
View/report issues

Topics

#widget #network #switch #visualization

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_switch_device