flutter_easy_drag 0.0.1 copy "flutter_easy_drag: ^0.0.1" to clipboard
flutter_easy_drag: ^0.0.1 copied to clipboard

A Flutter package for creating draggable widgets on any screen.

example/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_draggable_widget/draggable_widget.dart';
void main() {
  runApp(const MyApp());
}
class MyApp extends StatelessWidget {
  const MyApp({super.key});
  final double height=100.0;
  final double width=100.0;
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
          useMaterial3: true,
        ),
        home: Scaffold(
          body: SafeArea(
              child: Column(
                children: [
                  DraggableWidget(widget: Container(
                    height: height,
                    width: width,
                    decoration: BoxDecoration(
                        color: Colors.red,
                        borderRadius: BorderRadius.circular(10)
                    ),
                  ),
                      initialPosition: InitialPosition.center, height: height, width: width),
                  /// other widgets
                ],
              )
          ),
        )
    );
  }
}
5
likes
120
points
20
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for creating draggable widgets on any screen.

Documentation

API reference

License

MIT (license)

Dependencies

bloc, equatable, flutter, flutter_bloc

More

Packages that depend on flutter_easy_drag