All Projects → minikin → popover

minikin / popover

Licence: MIT license
Popover for Flutter. A popover is a transient view that appears above other content onscreen when you tap a control or in an area.

Programming Languages

dart
5743 projects
C++
36643 projects - #6 most used programming language
CMake
9771 projects
HTML
75241 projects
c
50402 projects - #5 most used programming language
swift
15916 projects

Projects that are alternatives of or similar to popover

backdrop
Backdrop implementation in flutter.
Stars: ✭ 203 (+125.56%)
Mutual labels:  widget, pub
feedback
A simple widget for getting better feedback.
Stars: ✭ 178 (+97.78%)
Mutual labels:  widget, pub
Hibiscus.js
Native Angular directives for Bootstrap4
Stars: ✭ 115 (+27.78%)
Mutual labels:  widget, popover
GoogleCloudLogging
Swift (Darwin) library for logging application events in Google Cloud.
Stars: ✭ 24 (-73.33%)
Mutual labels:  ipados
bs5-utils
A JavaScript utility package for Bootstrap 5 components.
Stars: ✭ 26 (-71.11%)
Mutual labels:  modal-dialog
ngx-widget-grid
Angular 2.x or in general ng-x module for dashboards
Stars: ✭ 65 (-27.78%)
Mutual labels:  widget
UT Framework
Various advanced tools built for Unreal Engine 4
Stars: ✭ 45 (-50%)
Mutual labels:  widget
dart-package-publisher
Action to Publish Dart / Flutter Package To https://pub.dev When you need to publish a package, just bump the version in pubspec.yaml
Stars: ✭ 45 (-50%)
Mutual labels:  pub
qtwidgetvirtualkeyboard
Qt Widget Virtual Keyboard
Stars: ✭ 19 (-78.89%)
Mutual labels:  widget
Textylic
A note taking app developed for the 22nd century
Stars: ✭ 34 (-62.22%)
Mutual labels:  widget
Motion-Tab-Bar
A beautiful animated flutter widget package library. The tab bar will attempt to use your current theme out of the box, however you may want to theme it.
Stars: ✭ 237 (+163.33%)
Mutual labels:  widget
yii2-content-tools
ContentTools editor implementation for Yii 2
Stars: ✭ 79 (-12.22%)
Mutual labels:  widget
BJOTPViewController
Entering OTP made simpler.
Stars: ✭ 42 (-53.33%)
Mutual labels:  ipados
sounds
Flutter plugin for sound. Audio recorder and player.
Stars: ✭ 74 (-17.78%)
Mutual labels:  widget
react-color
🎨 Is a tiny color picker widget component for React apps.
Stars: ✭ 50 (-44.44%)
Mutual labels:  widget
Ambar-Xamarin
A macOS Menu Bar app built with Xamarin and C#
Stars: ✭ 63 (-30%)
Mutual labels:  popover
yii2-datetime-widgets
Datetime widgets for Yii2
Stars: ✭ 22 (-75.56%)
Mutual labels:  widget
ViewPagers
When using the ViewPager widget it is not always obvious to the user that there are adjacent views they can navigate to. By implementing this widget you provide a clear indicator that there exists additional content which they can click or swipe to see.
Stars: ✭ 43 (-52.22%)
Mutual labels:  widget
Simple-Login-iOS
iOS client for SimpleLogin
Stars: ✭ 62 (-31.11%)
Mutual labels:  ipados
react-native-create-widget-tutorial
This is a tutorial for "React Native: How to create a home screen Widget for iOS and Android"
Stars: ✭ 67 (-25.56%)
Mutual labels:  widget

Stand With Ukraine

Popover

Popover screenshots

Popover for Flutter

Supported platforms Popover is released under the MIT license. Effective Dart PRs welcome!
Current Build Status.

Content

Features

A popover is a transient view that appears above other content onscreen when you tap a control or in an area. Typically, a popover includes an arrow pointing to the location from which it emerged. Popovers can be nonmodal or modal. A nonmodal popover is dismissed by tapping another part of the screen or a button on the popover. A modal popover is dismissed by tapping a Cancel or other button on the popover.

Source: Human Interface Guidelines.

Requirements

  • Dart: 2.18.0+
  • Flutter : 3.3.0+

Install

dependencies:
  popover: ^0.2.7

Example

See example/lib/main.dart.

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

class PopoverExample extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Popover Example')),
        body: const SafeArea(
          child: Padding(
            padding: EdgeInsets.all(16),
            child: Button(),
          ),
        ),
      ),
    );
  }
}

class Button extends StatelessWidget {
  const Button({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: 80,
      height: 40,
      decoration: const BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.all(Radius.circular(5)),
        boxShadow: [BoxShadow(color: Colors.black26, blurRadius: 5)],
      ),
      child: GestureDetector(
        child: const Center(child: Text('Click Me')),
        onTap: () {
          showPopover(
            context: context,
            transitionDuration: const Duration(milliseconds: 150),
            bodyBuilder: (context) => const ListItems(),
            onPop: () => print('Popover was popped!'),
            direction: PopoverDirection.top,
            width: 200,
            height: 400,
            arrowHeight: 15,
            arrowWidth: 30,
          );
        },
      ),
    );
  }
}

class ListItems extends StatelessWidget {
  const ListItems({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scrollbar(
      child: Padding(
        padding: const EdgeInsets.symmetric(vertical: 8),
        child: ListView(
          padding: const EdgeInsets.all(8),
          children: [
            InkWell(
              onTap: () {
                Navigator.of(context)
                  ..pop()
                  ..push(
                    MaterialPageRoute<SecondRoute>(
                      builder: (context) => SecondRoute(),
                    ),
                  );
              },
              child: Container(
                height: 50,
                color: Colors.amber[100],
                child: const Center(child: Text('Entry A')),
              ),
            ),
            const Divider(),
            Container(
              height: 50,
              color: Colors.amber[200],
              child: const Center(child: Text('Entry B')),
            ),
            const Divider(),
            Container(
              height: 50,
              color: Colors.amber[300],
              child: const Center(child: Text('Entry C')),
            ),
          ],
        ),
      ),
    );
  }
}

class SecondRoute extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Second Route'),
        automaticallyImplyLeading: false,
      ),
      body: Center(
        child: ElevatedButton(
          onPressed: () => Navigator.pop(context),
          child: const Text('Go back!'),
        ),
      ),
    );
  }
}

To see examples of the following package on a device or simulator:

cd example && flutter run

Support

Post issues and feature requests on the GitHub issue tracker.

License

The source code of Popover project is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].