import 'package:flutter/material.dart'; import 'package:teso/util/consts.dart'; class ErrorRedeem extends StatefulWidget { @override _ErrorRedeemState createState() => _ErrorRedeemState(); } class _ErrorRedeemState extends State { @override Widget build(BuildContext context) { return Scaffold( body: Center( child: Container( width: 300, height: 200, child: Column( children: [ Container( child: Icon( Icons.error, color: Colors.red, ), ), Container( child: Text( "An error occurred while trying to redeem coupon please try again !!!"), ), SizedBox( height: 30, ), Container( width: double.infinity, child: Align( alignment: Alignment.center, child: Container( width: 100, child: ElevatedButton( style: ElevatedButton.styleFrom( shape: RoundedRectangleBorder( borderRadius: BorderRadius.all( Radius.circular(20.0), ), ), primary: accentMain, ), onPressed: () => Navigator.pop(context), child: Text("Try again"), ), ), ), ), ], ), ), ), ); } }