g2x_positioned_relative_to_child 0.0.6
g2x_positioned_relative_to_child: ^0.0.6 copied to clipboard

Creates an overlay with position relative to the child.

g2x_positioned_relative_to_child #

creates an overlay with position relative to the child

Getting Started #

import 'package:g2x_positioned_relative_to_child/g2x_positioned_relative_to_child.dart';

var g2xPositionedRelative = G2xPositionedRelativeToChild();
var globalKey = GlobalKey();
var opened = false;

ElevatedButton(
  key: globalKey,
  child: Text("Aqui"),
  onPressed: (){
    if(opened){
      g2xPositionedRelative.hide();
    }
    else{
      g2xPositionedRelative.show(
        horizontalAxis: G2xHorizontalPositionAxis.center,
        context: context, 
        parentKey: globalKey,
        offSet: Offset(-100, 0),
        child: Container(
          height: 50,
          width: 200,
          color: Colors.red,
          child: Center(child: Text("Child")),
        )
      );
    }
    opened = !opened;
  },
)
1
likes
100
pub points
38%
popularity

Creates an overlay with position relative to the child.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on g2x_positioned_relative_to_child