andrebaltieri / Flunt

Validations and Notifications
https://github.com/andrebaltieri/flunt
MIT License
626 stars 162 forks source link

Notification Types #45

Closed diegosanfelix closed 3 years ago

diegosanfelix commented 4 years ago

Balta,

Very usefull class.

Wouldn't be nice to have 3 types of notifications (Success, Alert, Error) so we could use the list of notifications to alert to end-users?

andrebaltieri commented 3 years ago

Great question! Today Notification class is sealed preventing you to extend it! On version 2, Ill remove sealed modifier and youll be able to create your own notifications, for example:

public class Warning : Notification

As Warning is child of notification you can upcast it!