Skip to content

Commit

Permalink
chore(package): remove dependency on native_context_menu
Browse files Browse the repository at this point in the history
Closes macosui#179.

Removes all references to context menus.
  • Loading branch information
GroovinChip committed Mar 8, 2022
1 parent fd60aac commit 12b4977
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 98 deletions.
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ Flutter widgets and themes implementing the current macOS design language.
[![codecov](https://github.com/GroovinChip/macos_ui/actions/workflows/codecov.yaml/badge.svg)](https://github.com/GroovinChip/macos_ui/actions/workflows/codecov.yaml)
[![codecov](https://codecov.io/gh/GroovinChip/macos_ui/branch/dev/graph/badge.svg?token=1SZGEVVMCH)](https://codecov.io/gh/GroovinChip/macos_ui)

NOTE: This package depends on the excellent [native_context_menu](https://pub.dev/packages/native_context_menu) plugin.
Since it is a desktop plugin, and therefore does not target Android and iOS, the pub score of this package
is lower than 130

## Content

- [macos_ui](#macos_ui)
Expand All @@ -32,7 +28,6 @@ is lower than 130
- [Dialogs and Sheets](#dialogs)
- [MacosAlertDialog](#MacosAlertDialog)
- [MacosSheet](#MacosSheet)
- [Context Menus](#ContextMenus)
- [Fields](#fields)
- [MacosTextField](#macostextfield)
- [Labels](#labels)
Expand Down Expand Up @@ -326,15 +321,6 @@ showMacosSheet(

![](https://imgur.com/NV0o5Ws.png)

# Context Menus

macos_ui uses the [native_context_menu] plugin under the hood for Context Menus.
Please consult the readme for that plugin for usage.

![](https://lesnitsky-images.s3.eu-north-1.amazonaws.com/native_context_menu.gif)

(gif courtesy of the `native_context_menu` plugin)

# Fields

## MacosTextField
Expand Down
6 changes: 0 additions & 6 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:example/pages/buttons.dart';
import 'package:example/pages/colors_page.dart';
import 'package:example/pages/context_menus.dart';
import 'package:example/pages/dialogs_page.dart';
import 'package:example/pages/fields.dart';
import 'package:example/pages/indicators.dart';
Expand Down Expand Up @@ -58,7 +57,6 @@ class _DemoState extends State<Demo> {
const IndicatorsPage(),
const FieldsPage(),
const ColorsPage(),
const ContextMenusPage(),
const Center(
child: MacosIcon(
CupertinoIcons.add,
Expand Down Expand Up @@ -115,10 +113,6 @@ class _DemoState extends State<Demo> {
leading: MacosIcon(CupertinoIcons.infinite),
label: Text('Colors'),
),
SidebarItem(
leading: MacosIcon(CupertinoIcons.heart),
label: Text('Context Menus'),
),
SidebarItem(
leading: MacosIcon(CupertinoIcons.infinite),
label: Text('Item 3'),
Expand Down
53 changes: 0 additions & 53 deletions example/lib/pages/context_menus.dart

This file was deleted.

2 changes: 0 additions & 2 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import FlutterMacOS
import Foundation

import native_context_menu

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
NativeContextMenuPlugin.register(with: registry.registrar(forPlugin: "NativeContextMenuPlugin"))
}
11 changes: 2 additions & 9 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.10.1"
version: "0.12.0+1"
matcher:
dependency: transitive
description:
Expand All @@ -95,13 +95,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
native_context_menu:
dependency: transitive
description:
name: native_context_menu
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0+3"
nested:
dependency: transitive
description:
Expand Down Expand Up @@ -186,4 +179,4 @@ packages:
version: "2.1.1"
sdks:
dart: ">=2.14.0 <3.0.0"
flutter: ">=1.20.0"
flutter: ">=1.16.0"
2 changes: 0 additions & 2 deletions lib/macos_ui.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
library macos_ui;

export 'package:native_context_menu/native_context_menu.dart';

export 'src/buttons/back_button.dart';
export 'src/buttons/checkbox.dart';
export 'src/buttons/help_button.dart';
Expand Down
8 changes: 0 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0"
native_context_menu:
dependency: "direct main"
description:
name: native_context_menu
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0+3"
node_preamble:
dependency: transitive
description:
Expand Down Expand Up @@ -445,4 +438,3 @@ packages:
version: "3.1.0"
sdks:
dart: ">=2.14.0 <3.0.0"
flutter: ">=1.20.0"
6 changes: 2 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: macos_ui
description: Flutter widgets and themes implementing the current macOS design language.
version: 0.10.1
version: 0.12.0+1
homepage: "https://github.com/GroovinChip/macos_ui"

environment:
Expand All @@ -10,12 +10,10 @@ dependencies:
flutter:
sdk: flutter

native_context_menu: ^0.2.0+3

dev_dependencies:
flutter_test:
sdk: flutter
dart_code_metrics: ^4.4.0
dart_code_metrics: ^4.11.0
mocktail: ^0.2.0

flutter:
Expand Down

0 comments on commit 12b4977

Please sign in to comment.