Advertisement
mactech24

Something went wrong page

Jan 17th, 2023
11,488
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 5.71 KB | None | 0 0
  1. import 'package:credical/utile_size.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:flutter/services.dart';
  4. import 'package:flutter_svg/flutter_svg.dart';
  5.  
  6. class SomethingWentWrong extends StatefulWidget {
  7.   //
  8.   static String routeName = "/somethingWentWrong";
  9.   //
  10.   const SomethingWentWrong({super.key});
  11.  
  12.   @override
  13.   State<SomethingWentWrong> createState() => _SomethingWentWrongState();
  14. }
  15.  
  16. class _SomethingWentWrongState extends State<SomethingWentWrong> {
  17.   @override
  18.   Widget build(BuildContext context) {
  19.     SystemChrome.setSystemUIOverlayStyle(
  20.       SystemUiOverlayStyle(
  21.         statusBarColor: Colors.transparent,
  22.       ),
  23.     );
  24.     SizeConfig().init(context);
  25.     Size size = MediaQuery.of(context).size;
  26.     return Scaffold(
  27.       body: Column(
  28.         children: [
  29.           Container(
  30.             padding: EdgeInsets.symmetric(
  31.               horizontal: getProportionateScreenWidth(50),
  32.             ),
  33.             height: size.height * 0.45,
  34.             width: size.width,
  35.             child: SvgPicture.asset(
  36.               "assets/404 Error-bro.svg",
  37.             ),
  38.           ),
  39.           Text(
  40.             "Something went wrong",
  41.             style: TextStyle(
  42.               color: Color(0xFF0f7dff),
  43.               fontSize: getProportionateScreenWidth(22),
  44.               fontWeight: FontWeight.bold,
  45.             ),
  46.           ),
  47.           SizedBox(
  48.             height: getProportionateScreenHeight(10),
  49.           ),
  50.           Padding(
  51.             padding: EdgeInsets.symmetric(
  52.               horizontal: getProportionateScreenWidth(25),
  53.             ),
  54.             child: Text(
  55.               "Error message: Cannot read property 'baserate' of\nUndefined",
  56.               style: TextStyle(
  57.                 fontSize: getProportionateScreenWidth(13),
  58.               ),
  59.               textAlign: TextAlign.center,
  60.             ),
  61.           ),
  62.           Expanded(
  63.             child: Padding(
  64.               padding: EdgeInsets.all(
  65.                 getProportionateScreenWidth(23),
  66.               ),
  67.               child: Column(
  68.                 mainAxisAlignment: MainAxisAlignment.end,
  69.                 children: [
  70.                   Text(
  71.                     "Return home or Screenshot this page and send it with\ncredical support for assistance",
  72.                     style: TextStyle(
  73.                       fontSize: getProportionateScreenWidth(12),
  74.                     ),
  75.                     textAlign: TextAlign.center,
  76.                   ),
  77.                   SizedBox(
  78.                     height: getProportionateScreenHeight(10),
  79.                   ),
  80.                   Container(
  81.                     margin: EdgeInsets.symmetric(
  82.                       horizontal: getProportionateScreenWidth(30),
  83.                     ),
  84.                     width: size.width,
  85.                     height: getProportionateScreenHeight(50),
  86.                     decoration: BoxDecoration(
  87.                       borderRadius: BorderRadius.circular(
  88.                         getProportionateScreenWidth(10),
  89.                       ),
  90.                       color: Color(0xFF0f7dff),
  91.                     ),
  92.                     child: TextButton(
  93.                       style: ButtonStyle(
  94.                         shape: MaterialStateProperty.all(
  95.                           RoundedRectangleBorder(
  96.                             borderRadius: BorderRadius.circular(
  97.                               getProportionateScreenWidth(10),
  98.                             ),
  99.                           ),
  100.                         ),
  101.                       ),
  102.                       child: Text(
  103.                         "Return Home",
  104.                         style: TextStyle(
  105.                           color: Colors.white,
  106.                           fontSize: getProportionateScreenWidth(16),
  107.                         ),
  108.                       ),
  109.                       onPressed: () {},
  110.                     ),
  111.                   ),
  112.                   SizedBox(
  113.                     height: getProportionateScreenHeight(10),
  114.                   ),
  115.                   //Contact support
  116.                   Container(
  117.                     margin: EdgeInsets.symmetric(
  118.                       horizontal: getProportionateScreenWidth(30),
  119.                     ),
  120.                     width: size.width,
  121.                     height: getProportionateScreenHeight(50),
  122.                     decoration: BoxDecoration(
  123.                       borderRadius: BorderRadius.circular(
  124.                         getProportionateScreenWidth(10),
  125.                       ),
  126.                       color: Colors.transparent,
  127.                     ),
  128.                     child: TextButton(
  129.                       style: ButtonStyle(
  130.                         shape: MaterialStateProperty.all(
  131.                           RoundedRectangleBorder(
  132.                             side: BorderSide(
  133.                               color: Color(0xFF0f7dff),
  134.                               width: getProportionateScreenWidth(1),
  135.                             ),
  136.                             borderRadius: BorderRadius.circular(
  137.                               getProportionateScreenWidth(10),
  138.                             ),
  139.                           ),
  140.                         ),
  141.                       ),
  142.                       child: Text(
  143.                         "Contact support",
  144.                         style: TextStyle(
  145.                           color: Color(0xFF0f7dff),
  146.                           fontSize: getProportionateScreenWidth(16),
  147.                         ),
  148.                       ),
  149.                       onPressed: () {},
  150.                     ),
  151.                   ),
  152.                 ],
  153.               ),
  154.             ),
  155.           )
  156.         ],
  157.       ),
  158.     );
  159.   }
  160. }
  161.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement