giffy_dialog icon indicating copy to clipboard operation
giffy_dialog copied to clipboard

fixed broken imagePath property in asset and network giffy dialogs

Open danqulogy opened this issue 3 years ago • 0 comments

The Problem

The problem is in connection to an un-updated part of the document specifically the imagePath property in NetworkGifyDialog and AssetGiffyDialog property.

The Solution

Reading the source code reveals that the imagePath property has been replaced with image which is of type Image widget class.

NetworkGiffyDialog now uses Image widget against the new image property

onPressed: () {
  showDialog(
  context: context,builder: (_) => NetworkGiffyDialog(
    image: Image.asset("https://raw.githubusercontent.com/Shashank02051997/FancyGifDialog-Android/master/GIF's/gif14.gif"),
    title: Text('Granny Eating Chocolate',
            textAlign: TextAlign.center,
            style: TextStyle(
            fontSize: 22.0,
            fontWeight: FontWeight.w600)),
    description:Text('This is a granny eating chocolate dialog box.
          This library helps you easily create fancy giffy dialog',
          textAlign: TextAlign.center,
        ),
    entryAnimation: EntryAnimation.BOTTOM_TOP,
    onOkButtonPressed: () {},
  ) );
}

AssetGiffyDialog now uses Image widget against the new image property

onPressed: () {
  showDialog(
  context: context,builder: (_) => AssetGiffyDialog(
    image: Image.asset('assets/men_wearing_jacket.gif'),
    title: Text('Men Wearing Jackets',
            style: TextStyle(
            fontSize: 22.0, fontWeight: FontWeight.w600),
    ),
    description: Text('This is a men wearing jackets dialog box.
          This library helps you easily create fancy giffy dialog.',
          textAlign: TextAlign.center,
          style: TextStyle(),
        ),
    entryAnimation: EntryAnimation.RIGHT_LEFT,
    onOkButtonPressed: () {},
  ) );
}

danqulogy avatar Mar 14 '21 17:03 danqulogy