Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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 message

  • successHandler.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 params

  • backButton : If backButton is true, then HomeBack() 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

TextButton.icon()


Text button with icon

2

Text()

Tenant text

3

Icon()

Warning icon

4

AppBar()

Used in Scaffold appBar property

Files Path :

Primary Files : https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/widgets/CommonSuccessPage.dart ,

https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/widgets/SuccessPage.dart ,

https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/widgets/ErrorMessagePAge.dart

Model : https://github.com/misdwss/punjab-mgramseva/blob/master/frontend/mgramseva/lib/model/success_handler.dart

  • No labels