/flutter_show_popup

A flutter plugin to show text in popup :https://pub.dev/packages/show_more_text_popup

Primary LanguageDartMIT LicenseMIT

flutter_show_widget_popup with dynamic height and width

Flutter widget to show widgets in popup or overlay container. This fork has removed the Text widget and replaced it with a general Widget, thus any widget can be displayed.

Installation

Add this to your package's pubspec.yaml file

dependencies:
  ...
  show_more_text_popup: ^latest-version

Usage

First import show_more_text_popup.dart The given height and width are (partially-) ignored and calculated dynamically by flutter. The opacity parameter determines wether the widget has transparency.

import 'package:show_more_text_popup/show_more_text_popup.dart';
ShowMoreTextPopup popup = ShowMoreTextPopup(context,
       widget: Text(
          text,
          overflow: TextOverflow.clip,
          style: TextStyle(color: Colors.black),
          maxLines: 10,
        ),
        height: 10,
        width: 150,
        backgroundColor: backgroundColorStart,
        padding: EdgeInsets.all(10.0),
        borderRadius: BorderRadius.circular(10.0),
        opacity: 0.9,
        vsync: this
);

popup.show(
  widgetKey: key,
);

Screenshots