Skip to content

Commit

Permalink
- Update dependencies
Browse files Browse the repository at this point in the history
- Release 0.1.3
  • Loading branch information
BreX900 committed Apr 22, 2023
1 parent a7a6312 commit 0a50532
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.1.3
- Update dependencies

## 0.1.2
- Fix bottom edges resolving

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Enable a widget to be dragged allowing it to be removed if dropped in an area or

[**TRY WEB APP EXAMPLE**](https://brex900.github.io/mek_floating_drag/#/)

<img width="300px" alt="Example" src="example.gif"/>

## Features

- [x] You can drag it anywhere you want
Expand Down
Binary file added example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion lib/src/floating_draggable/floating_draggable.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:async';

import 'package:flutter/widgets.dart';
import 'package:mek_floating_drag/src/floating_draggable/floating_draggable_controller.dart';
import 'package:mek_floating_drag/src/fly_zone/fly_zone.dart';
Expand Down Expand Up @@ -232,7 +234,7 @@ class FloatingDraggableState extends State<FloatingDraggable> with TickerProvide

if (_builder != null) return;

controller.animateElastic();
unawaited(controller.animateElastic());
}

Widget _buildAppearAnimation(BuildContext context, Widget child) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/fly_zone/fly_zone.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class _FlyZoneInOverlayState extends State<_FlyZoneInOverlay> {
_entry = OverlayEntry(builder: _buildEntries);

WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
Overlay.of(context)!.insert(_entry);
Overlay.of(context).insert(_entry);
});
}

Expand Down
6 changes: 4 additions & 2 deletions lib/src/fly_zone/fly_zone_controller.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:async';

import 'package:flutter/widgets.dart';
import 'package:mek_floating_drag/src/floating_drag_bin/floating_drag_target_controller.dart';
import 'package:mek_floating_drag/src/floating_draggable/floating_draggable_controller.dart';
Expand Down Expand Up @@ -37,9 +39,9 @@ class FlyZoneController extends ChangeNotifier {
final isDragging = _draggableControllers.any((e) => e.isDragging.value);
for (final controller in _dragTargetControllers) {
if (isDragging) {
controller.show();
unawaited(controller.show());
} else {
controller.hide();
unawaited(controller.hide());
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion lib/src/fly_zone/restricted_fly_zone.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:mek_floating_drag/src/fly_zone/fly_zone.dart';
Expand All @@ -19,7 +21,7 @@ class RestrictedFlyZone extends StatelessWidget {
return Listener(
onPointerDown: (_) {
for (final controller in flyZoneController.draggableControllers) {
controller.animateRestrict();
unawaited(controller.animateRestrict());
}
},
child: child,
Expand Down
8 changes: 4 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: mek_floating_drag
description: Enable a widget to be dragged allowing it to be removed if dropped in an area or hidden if time passes or is pressed out.
version: 0.1.2
version: 0.1.3
repository: https://github.com/BreX900/mek_floating_drag

environment:
sdk: ">=2.17.0 <3.0.0"
flutter: ">=3.0.0"
sdk: ">=2.19.0 <3.0.0"
flutter: ">=3.7.0"

dependencies:
flutter:
Expand All @@ -14,7 +14,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
mek_lints: ^0.3.0
mek_lints: ^1.0.0

flutter:

Expand Down

0 comments on commit 0a50532

Please sign in to comment.