getView method
dynamic
getView(
- dynamic context
Implementation
getView(context) {
switch (page) {
case "loading":
return Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
"packages/intram_sdk_flutter/assets/images/logo-intram.png",
width: size.width * 0.3),
SizedBox(
height: 20,
),
LoadingWidget(
text: "Création de la demande de paiement",
color: widget.color,
)
],
),
);
case "make_pay":
return viewMakePay(context);
case "error":
return Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset("packages/intram_sdk_flutter/assets/images/error.png",
width: size.width * 0.4),
SizedBox(
height: 10,
),
SizedBox(
width: size.width * 0.8,
child: Text(
"Le paiement a échoué. Veuillez vérifier que les informations de paiement que vous avez fournies sont correctes. ",
style: TextStyle(
color: Colors.black, fontSize: size.width * 0.04),
textAlign: TextAlign.center,
),
),
SizedBox(
height: 25,
),
RoundedLoadingButton(
width: size.width * 0.5,
height: size.height * 0.05,
child: Text('Fermer',
style: TextStyle(
color: Colors.white, fontSize: size.width * 0.04)),
color: ColorConstant.fromHex(widget.color),
controller: _btnController,
borderRadius: 2,
elevation: 0,
onPressed: _doSomething,
)
],
),
);
case "success":
return Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
"packages/intram_sdk_flutter/assets/images/success.png",
width: size.width * 0.4),
SizedBox(
height: 10,
),
SizedBox(
width: size.width * 0.8,
child: Text(
"Félicitations ! Votre paiement a été effectué avec succès. ",
style: TextStyle(
color: Colors.black, fontSize: size.width * 0.04),
textAlign: TextAlign.center,
),
),
SizedBox(
height: 25,
),
RoundedLoadingButton(
width: size.width * 0.5,
height: size.height * 0.05,
child: Text('Fermer',
style: TextStyle(
color: Colors.white, fontSize: size.width * 0.04)),
color: ColorConstant.fromHex(widget.color),
controller: _btnController,
borderRadius: 2,
elevation: 0,
onPressed: _doSomething,
)
],
),
);
case "waiting_pay":
return Container(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
"packages/intram_sdk_flutter/assets/images/logo-intram.png",
width: size.width * 0.3),
SizedBox(
height: size.height*0.03,
),
LoadingWidget(
text: "En attente de confirmation",
color: widget.color,
),
SizedBox(
height: size.height*0.03,
),
SizedBox(
width: size.width * 0.8,
child: Text(
"CONSULTEZ VOTRE TELEPHONE POUR VALIDER LE PAIEMENT",
textAlign: TextAlign.center,
style: TextStyle(fontSize: size.width * 0.04, color: Colors.orange, fontWeight: FontWeight.bold),
),
),
SizedBox(
height: size.height*0.03,
),
Text(
"Vous n'avez pas reçu de demande de paiement ?",
style: TextStyle(fontSize: size.width * 0.04, color: ColorConstant.black),
),
SizedBox(
height: size.height*0.015,
),
Text(
"Tapez",
style: TextStyle(fontSize: size.width * 0.04, color: Colors.orange),
),
SizedBox(
height: size.height*0.02,
),
Text(
"*880# puis 0 puis 2 et 1",
style: TextStyle(fontSize: size.width * 0.04, color: Colors.redAccent),
),
],
),
);
}
}