koukibadr / Cherry-Toast

https://pub.dev/packages/cherry_toast
MIT License
22 stars 16 forks source link

toastPosition not working #62

Closed unleed closed 9 months ago

unleed commented 12 months ago

toastPosition property is not working as expected, toast still appearing at the top (tested on macOS).

void warningToast({
    required String text,
    String? actionText,
    Function? actionHandler,
    required BuildContext context,
  }) {
    CherryToast.warning(
      title: Text(
        text,
        style: TextStyle(
          color: Colors.amber.shade700,
          fontWeight: FontWeight.w600,
        ),
      ),
      toastDuration: duration,
      shadowColor: Colors.transparent,
      toastPosition: Position.bottom,
      displayCloseButton: false,
      animationType: AnimationType.fromTop,
      action: actionText != null
          ? Text(
              actionText,
              style: TextStyle(
                color: Colors.blue,
              ),
            )
          : null,
      actionHandler: actionHandler,
    ).show(context);
  }
elssiany commented 11 months ago

Hello, I have created this PR adding the toast positions, you can see the solution, regards.

unleed commented 11 months ago

Hello, I have created this PR adding the toast positions, you can see the solution, regards.

Thanks!

koukibadr commented 10 months ago

A new version has been published with the new changes check it out 1.7.0 thanks @elssiany for the new updates you bring to the package

@unleed-l feel free to close this issue