raw_context 1.0.2+1 copy "raw_context: ^1.0.2+1" to clipboard
raw_context: ^1.0.2+1 copied to clipboard

Easy context menu creation with flutter to speed up development.(A wrapper on Flutter's popup menu)

Raw Context #

Easy context menu creation with flutter to speed up development. (A wrapper on Flutter's popup menu).

Note: Opening the popup menu with the keyboard open will throw an error on your app. Its a flutter error so ensure that you close before allowing the user to tap on this context menu.

RawContext();//Widget with the menu icon and the context menu functionality

Parameters for RawContext() Widget: #

List<RawContextItem> items = [];//Clickable context menu options
Color iconColor = Colors.black;
Color contextMenuColor = Colors.white;
Color textColor = Colors.black;
double iconSize;
double textSize;
String font; //Font family String
Widget child; //A flutter widget/Icon to be used to launch the context menu when clicked if you don't want the default icon to be used.

Full Example:

import 'package:flutter/material.dart';
import 'package:raw_context/raw_context.dart';

void main() {
  return runApp(
    MaterialApp(
      home: Scaffold(
        body: Center(
          child: RawContext(
            textColor: Colors.white,
            contextMenuColor: Colors.lightBlue.shade700,
            child: CircleAvatar(
              radius: 60,
              backgroundColor: Colors.green,
              child: Icon(
                Icons.check,
                color: Colors.white,
                size: 60,
              ),
            ),
            items: [
            RawContextItem(
              onPressed: (){
                print('I am sexy');
              },
              item: Text("Click Me")),
            ],
          ),
        ),
      ),
    ),
  );
}

Hecho en 🇵🇷 por Radamés J. Valentín Reyes

0
likes
95
pub points
14%
popularity

Publisher

unverified uploader

Easy context menu creation with flutter to speed up development.(A wrapper on Flutter's popup menu)

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, meta

More

Packages that depend on raw_context