v1.2.1floating_overlay
एक विजेट वраФ퍰 कि एक फ्लोटिंग विजेट को खींचने और पुनर्स्केल करने की अनुमति देता है।
एक विजेट वैरीयर जो एक फ्लोटिंग विजेट को खींचने और पुनर्स्केल करने की अनुमति देता है
यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
A widget wrapper that allows a floating widget be dragged and rescaled.
Add to your pubspec.yaml file:
dependencies:
flutter:
sdk: flutter
floating_overlay: ^1.2.1
Import the package
import 'package:floating_overlay/floating_overlay.dart';
Create a FloatingOverlayController
final controller = FloatingOverlayController.absoluteSize(
maxSize: const Size(200, 200),
minSize: const Size(100, 100),
start: Offset.zero,
padding: const EdgeInsets.all(20.0),
constrained: true,
);
or
final controller = FloatingOverlayController.relativeSize(
maxScale: 2.0,
minScale: 1.0,
start: Offset.zero,
padding: const EdgeInsets.all(20.0),
constrained: true,
);
Insert the FloatingOverlay widget inside your widget tree and give it the controller, a child and a floatingChild.
FloatingOverlay(
controller: controller,
floatingChild: SizedBox.square(
dimension: 100.0,
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
border: Border.all(
color: Colors.black,
width: 5.0,
),
),
),
),
child: Container(),
);
Then use the controller to make the floating child show or hide.
controller.hide();
controller.isFloating;
controller.show();
controller.toggle();
निर्भरता सूची 5 आइटम
>=7.2.1 < 9.0.0>=1.0.2 < 2.0.0>=2.0.3 < 3.0.0{"sdk":"flutter"}^1.0.0उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗