Allow overriding onSubmit event in dialogs.
Make onSubmit method private and refactor.
refactor.
Merge pull request #2344 from dart-lang/dialog_submit

Allow overriding onSubmit event in dialogs.