marcos930807 / awesomeDialogs

A new Flutter package project for simple a awesome dialogs
Other
339 stars 110 forks source link

FlareHeader default in nullsafety-0 won't be hit, DialogType.INFO reversed #67

Closed PcolBP closed 3 years ago

PcolBP commented 3 years ago

image As you can see, after upgrade to awesome_dialog: ^2.0.0-nullsafety.0 INFO dialog reversed.

Warning case looks ok: image

Changes

case DialogType.INFO:
        return FlareActor(
          "packages/awesome_dialog/assets/flare/info2.flr",
          alignment: Alignment.center,
          fit: BoxFit.cover,
          animation: loop ? 'appear_loop' : 'appear',
          callback: (call) {},
        );
        break;

on

case DialogType.INFO:
        return FlareActor(
          "packages/awesome_dialog/assets/flare/info.flr",
          alignment: Alignment.center,
          fit: BoxFit.cover,
          animation: 'appear',
          callback: (call) {},
        );
        break;

Solved problem. image

After NNBD Default switch in FlareHeader wont be hit because DialogType can not be null, should we add DialogType.INFO and DialogType.InfoReversed ?

marcos930807 commented 3 years ago

Hi @itmediacreations the change on DialogType.INFO animation was introduced on version 1.3.0 as per request on #41, the Idea of INFO_REVERSED look great to me.

marcos930807 commented 3 years ago

After NNBD Default switch in FlareHeader wont be hit because DialogType can not be null.

This is true but no a big deal since DialogType has a default value of INFO. I will take a look to your PR.

PcolBP commented 3 years ago

After NNBD Default switch in FlareHeader wont be hit because DialogType can not be null.

This is true but no a big deal since DialogType has a default value of INFO. I will take a look to your PR.

Yes it has, but default one is reversed, and can not provide any other DialogType currently to get normal looking DialogType.INFO

marcos930807 commented 3 years ago

After NNBD Default switch in FlareHeader wont be hit because DialogType can not be null.

This is true but no a big deal since DialogType has a default value of INFO. I will take a look to your PR.

Yes it has, but default one is reversed, and can not provide any other DialogType currently to get normal looking DialogType.INFO

Your PR is Great, but you do you think you can leave INFO as i and INFOREVERSE as Exclamation !, to be consistent with #41, then you could use INFOREVERSE and have de old INFO behavior.