expandable_dialogs 0.0.4

  • Readme
  • Changelog
  • Example
  • Installing
  • 45

expandable_dialogs #

A new Flutter package for expandable dialogs

Overview #

This package helps to transform any flutter widget into a floating draggable window.

Usage #

First, we need to do add expanded_dialogs to the dependencies of the pubspec.yaml

expandable_dialogs: ^ 0.0.4

Then you can use it to show your draggable dialog

onPressed: () {
            context: context,
            child: Builder(
              builder: (context) => Scaffold(
                appBar: AppBar(
                  title: ExpandableStatus.of(context).isExpanded
                      ? Text("Not Expanded")
                      : Text("Expanded"),
                  actions: <Widget>[
                    IconButton(icon: Icon(Icons.open_in_new), onPressed: () {})
                body: Container(),

Notes #

The expand status of the dialog can be accesses by


Better wrap your widget with a builder so it can provide the proper context to be able to access the isExpanded flag.

[0.0.1] - TODO: Add release date. #

0.0.1 #

Initial release

0.0.2 #

Minor changes

0.0.3 #

Change homepage to GitHub repo

0.0.4 #

Add ReadMe


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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      home: MyHomePage(title: 'Expandable Dialog demo'),

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  _MyHomePageState createState() => _MyHomePageState();

class _MyHomePageState extends State<MyHomePage> {
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      floatingActionButton: FloatingActionButton(
        child: Icon(Icons.navigate_next),
        onPressed: () {
            context: context,
            child: Builder(
              builder: (context) => Scaffold(
                appBar: AppBar(
                  title: ExpandableStatus.of(context).isExpanded
                      ? Text("You can closeMe")
                      : Text("DragUpToExpand"),
                  actions: <Widget>[
                    IconButton(icon: Icon(Icons.open_in_new), onPressed: () {})
                body: Center(
                  child: ExpandableStatus.of(context).isExpanded
                      ? Text("Expanded", style: TextStyle(fontSize: 50.0),)
                      : Text("Floating", style: TextStyle(fontSize: 50.0),),
            verticalOnly: true,
//            topPadding: 80.0,
//            bottomPadding: 16.0,
//            leftPadding: 16.0,
//            rightPadding: 16.0,
      body: Container(
          child: Container(
        color: Colors.blueGrey,

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  expandable_dialogs: ^0.0.4

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:expandable_dialogs/expandable_dialogs.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Mar 27, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health suggestions

Fix lib/expandable_dialogs.dart. (-0.50 points)

Analysis of lib/expandable_dialogs.dart reported 1 hint:

line 160 col 15: 'inheritFromWidgetOfExactType' is deprecated and shouldn't be used. Use dependOnInheritedWidgetOfExactType instead. This feature was deprecated after v1.12.1..

Maintenance suggestions

The package description is too short. (-16 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies