패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.0.5

spider_web_control

사용자 정의 가능한 노드와 연결을 가진 상호작용식 거미줄 모양 컨트롤 위젯을 생성하기 위한 Flutter 패키지입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
14
좋아요
2
Pub 점수
160

패키지 설치

flutter pub add spider_web_control

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

개발자가 상호작용 가능한 거미줄 모양의 컨트롤 위젯을 만들 수 있도록 해주는 플러터 패키지입니다. 노드를 사용자 정의하고 그 사이에 동적 연결을 가능하게 하여 관계를 시각화하거나 반경 배열을 가진 게임 UI를 만드는 데 이상적입니다. 모바일, 웹, 데스크톱 등 여러 플랫폼을 지원하여 크로스플랫폼 애플리케이션에 유연하게 활용할 수 있습니다. 직관적인 API를 통해 복잡하고 애니메이션 처리된 네트워크형 인터페이스 구현을 간편하게 만듭니다.

사용 사례

  • 반경 레이아웃을 갖춘 인터랙티브 UI
  • 네트워크 기반 메커니즘을 위한 게임 개발
  • 시각적 데이터 관계 표시
  • 사용자 정의 가능한 노드 및 연결 인터페이스
  • 그래프 이론을 위한 교육 도구
  • 동적 인터페이스 프로토타이핑

주요 기능

  • 사용자 정의 가능한 노드 및 연결
  • 애니메이션된 웹처럼 생긴 상호작용
  • 크로스 플랫폼 지원
  • 확장 가능한 위젯 디자인
  • 반응형 레이아웃 처리
  • 실시간 사용자 상호작용

적합한 대상

  • 게임 개발자
  • UI/UX 디자이너
  • 교육 앱 제작자
  • 데이터 시각화 프로젝트
  • 인터랙티브 프로토타입 빌더

고려 사항

  • 노드 수가 많을수록 성능이 달라질 수 있습니다
  • 작은 화면에서는 레이아웃 관리에 주의가 필요합니다
  • 기본 예제를 넘어서는 문서가 제한적입니다
  • 정적 또는 천천히 변화하는 네트워크에 가장 적합
  • 생산용 앱을 위해 추가 스타일링이 필요할 수 있습니다
  • 실시간 멀티플레이어 시나리오에 최적화되지 않음

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Spider Web Control

Static Badge Static Badge Static Badge

Demo

A customizable spider web control widget for Flutter that detects touch directions with interactive visual effects.

Features

  • Customizable appearance: Change colors, size, and web structure
  • Direction detection: Get callbacks for 8-directional touch input (R, L, F, B, FR, FL, BR, BL)
  • Interactive effects: Web threads warp and bend around touch points
  • Flexible integration: Works with any connection type (Bluetooth, HTTP, WebSocket, etc.)
  • Theme support: Built-in dark and light theme configurations

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  spider_web_control: ^0.0.2

Usage

Basic Usage
import 'package:spider_web_control/spider_web_control.dart';

SpiderWebControl(
  onDirectionChanged: (direction) {
    print('Direction: $direction');
    // Handle direction change (e.g., send to device)
  },
)
Custom Configuration
SpiderWebControl(
  config: SpiderWebConfig(
    size: 400.0,
    threadColor: Colors.cyan,
    dewDropColor: Colors.lightBlue,
    centerThreshold: 100.0,
    sendInterval: Duration(milliseconds: 500),
  ),
  onDirectionChanged: (direction) {
    // Your custom logic here
  },
  onTouchStart: () => print('Touch started'),
  onTouchEnd: () => print('Touch ended'),
)
Using with Bluetooth
class MyBluetoothController extends StatelessWidget {
  final BluetoothConnection connection;

  MyBluetoothController({required this.connection});

  @override
  Widget build(BuildContext context) {
    return SpiderWebControl(
      config: SpiderWebConfig.darkTheme(size: 350.0),
      onDirectionChanged: (direction) {
        // Send direction to Bluetooth device
        connection.output.add(Uint8List.fromList(direction.codeUnits));
      },
    );
  }
}
Theme Examples
// Dark theme
SpiderWebControl(
  config: SpiderWebConfig.darkTheme(size: 300.0),
  onDirectionChanged: (direction) => handleDirection(direction),
)

// Light theme
SpiderWebControl(
  config: SpiderWebConfig.lightTheme(size: 300.0),
  onDirectionChanged: (direction) => handleDirection(direction),
)

// Custom theme
SpiderWebControl(
  config: SpiderWebConfig(
    size: 320.0,
    threadColor: Colors.purple,
    minorThreadColor: Colors.purpleAccent,
    dewDropColor: Colors.pink,
    radialDivisions: 48,
    circleDivisions: 30,
  ),
  onDirectionChanged: (direction) => handleDirection(direction),
)

Configuration Options

Property Type Default Description
size double 300.0 Size of the spider web widget
threadColor Color Colors.blue Main thread color
minorThreadColor Color Colors.blueGrey Minor thread color
dewDropColor Color Colors.lightBlue Dew drop accent color
centerThreshold double 80.0 Dead zone radius in center
sendInterval Duration Duration(seconds: 1) Minimum time between direction callbacks
radialDivisions int 36 Number of radial web divisions
circleDivisions int 25 Number of circular web divisions

Direction Values

The widget returns these direction strings:

  • 'R' - Right
  • 'L' - Left
  • 'F' - Forward/Up
  • 'B' - Back/Down
  • 'FR' - Forward-Right
  • 'FL' - Forward-Left
  • 'BR' - Back-Right
  • 'BL' - Back-Left
  • 'Disabled Zone' - Center area (not sent to callback)

License

MIT License - see LICENSE file for details.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.