flutter_popmenu_sdk 0.0.3

Flutter Android iOS

a flutter plugin for using popmenu in iOS and android

flutter_popmenu_sdk #

a flutter plugin for using popmenu

Getting Started #

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

flutter_popmenu_sdk plugin #


Usage #

To use this plugin,add flutter_popmenu_sdk plugin as a dependency in your pubspec.yaml file.

Example #

import 'package:flutter/material.dart'; import 'dart:async'; import 'package:flutter/services.dart'; import 'package:flutter_popmenu_sdk/flutter_popmenu_sdk.dart';

child: GestureDetector( key:anchorKey, onTap: (){ print('RenderObject renderObject = context.findRenderObject();----------------------------'); ///获取点击当前位置 RenderBox renderBox = anchorKey.currentContext.findRenderObject(); var offset = renderBox.localToGlobal(Offset.zero);

        ///选择弹出框
        Navigator.push(context, PopRoute(child: Popup(
        child: PopMenu(chooseList: widget.chooseList,width:70,height:127,clickFn: _clickAction),
        left: offset.dx,
        top: offset.dx + 127,
        // width: 70,
        // height: 127,
        onClick: (){
            print("exit");
        },
        ),),
        );
    },
    child: Text('Running on: _platformVersion\n'),
)
0
likes
65
pub points
0%
popularity

a flutter plugin for using popmenu in iOS and android

Homepage

Documentation

API reference

Uploader

wmp505490956@gmail.com

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_popmenu_sdk