CommonSuccessPage & ErrorPage
User is navigated to the CommonSuccessPage, to get the success message of an API call, and user is navigated to the Error page, when there is invalid API call.
Features of CommonSuccessPage :
successHandler.header
: CommonSuccessPage renders a green coloured container containing the customised success messagesuccessHandler.downloadLinkLabel
,successHandler.downloadLink
,successHandler.whatsAppShare
: Developers have the options to add customised buttons of their choice in this screen. (For eg. Download, Share)successHandler.subtitle
:Developers also have the option to add the back button if they want.successHandler.backButtonText
: If a customised navigator elevated button is required on the bottom of the screen, the developer can use this variable with required paramsbackButton
: IfbackButton
is true, thenHomeBack()
button appears.
Features of ErrorPage :
ErrorPage is a simple screen that renders a container containing the error message of the API call.
HomeBack()
button is present as default for all error message page.
Widgets used from Flutter Material Library
SL No | Widgets | Description |
---|---|---|
1 |
|
|
2 |
| button text |
3 |
| Warning icon |
4 |
| Used in Scaffold appBar property |
Files Path :
Primary Files : https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/widgets/CommonSuccessPage.dart ,