MixinNetwork / MixinNetwork/flutter-plugins

[desktop_drop] Exporting 'events.dart' request

Open
#386 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
512
Forks
292
Avg merge
15h 8m
Merged PRs (30d)
7

Description

I was working on drop zone highlighting. I used a raw drop event listener to change the widget state when the user starts dragging a file over the application. I had to import a file from the src directory to complete my task.

//Linter message: Import of a library in the 'lib/src' directory of another package. (Documentation)
import 'package:desktop_drop/src/events.dart';
...
  @override
  void initState() {
    DesktopDrop.instance.addRawDropEventListener(_onDropEvent);
    ...
    super.initState();
  }

  @override
  void dispose() {
    DesktopDrop.instance.removeRawDropEventListener(_onDropEvent);
    ...
    super.dispose();
  }

  void _onDropEvent(DropEvent event) {
    if (_dropSubject.value && (event is DropDoneEvent || event is DropExitEvent)) {
      _dropSubject.add(false);
    } else if (!_dropSubject.value && event is DropEnterEvent) {
      _dropSubject.add(true);
    }
  }

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading src/events.dart and the desktop_drop package's public entry point to understand how its event types are exposed. Make the event API available without importing the package's src directory, then verify the package's existing analysis or test checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
desktop
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.