custom_context_menu

Creator: coderz1093

Last updated:

0 purchases

custom_context_menu Image
custom_context_menu Images

Languages

Categories

Add to Cart

Description:

custom context menu

A custom implementation of the text selection toolbar in Flutter with support for adding custom backgrounds, paddings and border radius to Cupertino buttons.
A text selection toolbar or a context menu, is the little menu that pops-up when the user long presses the text field or selects a piece of text from that text field. This menu gives a user the ability to manipulate an editable text. Customizing it according to your app appearence, could improve your design.
Features #
With this package, you can customize the various different appearence of a context menu for your TextField.

Change the background color of a button, by using the backgroundColor property
Change the background color of a disabled button, by using the disabledColor property
Change the border radius with borderRadius property
Change the padding of a button to make it look bigger, by using the buttonPadding property

Getting started #

Add the custom_context_menu package to your pubspec.yaml file:

dependencies:
custom_context_menu: ^0.1.0
copied to clipboard

Import the package in your Dart file:

import 'package:custom_context_menu/custom_context_menu.dart';
copied to clipboard
Usage #
Use the CustomContextMenu widget inside your TextField's contextMenuBuilder property:
TextField(
enableInteractiveSelection: true,
contextMenuBuilder: (BuildContext context, EditableTextState editableTextState) {
return CustomContextMenu(
editableTextState: editableTextState,
backgroundColor: Colors.red,
disabledColor: Colors.grey,
borderRadius: 6.0,
buttonPadding: 6.0,
);
}
);
copied to clipboard
Contributing #
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
Additional information #
This is an on-going project. Looking forward for any contribution and help. New features are coming soon.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.