I want to override Dialog so that it disposes itself the very moment it shows.
though it is a strange question, but you can override onShow() or onShowCompleted() and call dispose() inside one of them to close the dialog immediately.