menu_float 0.0.14 copy "menu_float: ^0.0.14" to clipboard
menu_float: ^0.0.14 copied to clipboard

A menu float package to use on menu like tooltip, dropdown and etc.

example/lib/main.dart

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

const double landscapeWidth = 1024;
const double landscapeHeight = 769;

void main() {
  runApp(const MenuFloatDemo());
}

class MenuFloatExampleDemo extends StatelessWidget {
  final bool top;
  final bool left;
  final bool right;
  final double x;
  final double y;

  const MenuFloatExampleDemo({
    Key? key,
    this.top = false,
    this.left = false,
    this.right = false,
    required this.x,
    required this.y,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MenuFloatExampleTestPage(
        x: x, y: y, top: top, left: left, right: right);
  }
}

/// This class is a stateless widget that creates a menu float button
class MenuFloatDemo extends StatelessWidget {
  const MenuFloatDemo({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: Stack(
        children: const [
          // y: 0
          MenuFloatExampleDemo(x: 0, y: 0),
          MenuFloatExampleDemo(x: 500, y: 0),
          MenuFloatExampleDemo(x: 930, y: 0),
          // y: 400
          MenuFloatExampleDemo(x: 0, y: 400),
          MenuFloatExampleDemo(x: 500, y: 400),
          MenuFloatExampleDemo(x: 930, y: 400),
          // y: 730
          MenuFloatExampleDemo(x: 0, y: 730),
          MenuFloatExampleDemo(x: 500, y: 730),
          MenuFloatExampleDemo(x: 930, y: 730),
        ],
      ),
    );
  }
}
6
likes
130
pub points
59%
popularity

Publisher

unverified uploader

A menu float package to use on menu like tooltip, dropdown and etc.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on menu_float