v0.0.5
spider_web_control
कस्टम नोड्स और कनेक्शन के साथ इंटरैक्टिव स्पाइडर वेब-जैसे कंट्रोल विजेट्स बनाने के लिए एक Flutter पैकेज।
2लाइक 1430-दिन डाउनलोड160Pub अंक
AndroidiOSWebmacOSWindowsLinux
Flutter के लिए एक कस्टमाइज़ेबल स्पाइडर वेब कंट्रोल विजेट जो टच दिशाओं का पता लगाता है और इंटरैक्टिव विजुअल प्रभाव प्रदान करता है।
यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
A customizable spider web control widget for Flutter that detects touch directions with interactive visual effects.
Add this to your package's pubspec.yaml file:
dependencies:
spider_web_control: ^0.0.2
import 'package:spider_web_control/spider_web_control.dart';
SpiderWebControl(
onDirectionChanged: (direction) {
print('Direction: $direction');
// Handle direction change (e.g., send to device)
},
)
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'),
)
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));
},
);
}
}
// 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),
)
| 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 |
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)MIT License - see LICENSE file for details.
निर्भरता सूची 3 आइटम
{"sdk":"flutter"}{"sdk":"flutter"}^5.0.0उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗