bg color updated to white
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../core/styles/app_color.dart';
|
||||
|
||||
class CustomErrorWidget extends StatelessWidget {
|
||||
final String errorMessage;
|
||||
|
||||
@@ -8,6 +10,7 @@ class CustomErrorWidget extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColor.plainWhite,
|
||||
body: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
||||
@@ -18,69 +18,73 @@ class NoInternet extends StatelessWidget {
|
||||
return WillPopScope(
|
||||
onWillPop: () => Future.value(false),
|
||||
child: Scaffold(
|
||||
backgroundColor: AppColor.plainWhite,
|
||||
body: Column(children: [
|
||||
Center(
|
||||
child: Container(
|
||||
margin: const EdgeInsets.only(top: 100),
|
||||
height: 180.h,
|
||||
width: 1.sw,
|
||||
child: Image.asset(AppImages.noInternetImage),
|
||||
),
|
||||
),
|
||||
Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 100),
|
||||
child: Center(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
const SizedBox(
|
||||
height: 15.0,
|
||||
),
|
||||
Container(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Text(
|
||||
"Internet Connection is Down!\n\nEnsure your internet's up and running.",
|
||||
textAlign: TextAlign.center,
|
||||
style: GoogleFonts.dmSans(
|
||||
fontSize: 18.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
)),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 30.0,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
final connectivityResult =
|
||||
await (Connectivity().checkConnectivity());
|
||||
if (connectivityResult[0] == ConnectivityResult.wifi ||
|
||||
connectivityResult[0] == ConnectivityResult.mobile) {
|
||||
goRouter.pop();
|
||||
} else {
|
||||
errorToastMessage(context, "Internet is still down");
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
height: 54.h,
|
||||
width: 330.w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.h),
|
||||
color: AppColor.primaryColor2),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Try Again",
|
||||
style: GoogleFonts.dmSans(
|
||||
color: AppColor.plainWhite, fontSize: 20.sp),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
Center(
|
||||
child: Container(
|
||||
margin: const EdgeInsets.only(top: 100),
|
||||
height: 180.h,
|
||||
width: 1.sw,
|
||||
child: Image.asset(AppImages.noInternetImage),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
])),
|
||||
Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 100),
|
||||
child: Center(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
const SizedBox(
|
||||
height: 15.0,
|
||||
),
|
||||
Container(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Text(
|
||||
"Internet Connection is Down!\n\nEnsure your internet's up and running.",
|
||||
textAlign: TextAlign.center,
|
||||
style: GoogleFonts.dmSans(
|
||||
fontSize: 18.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
)),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 30.0,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
final connectivityResult =
|
||||
await (Connectivity().checkConnectivity());
|
||||
if (connectivityResult[0] ==
|
||||
ConnectivityResult.wifi ||
|
||||
connectivityResult[0] ==
|
||||
ConnectivityResult.mobile) {
|
||||
goRouter.pop();
|
||||
} else {
|
||||
errorToastMessage(
|
||||
context, "Internet is still down");
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
height: 54.h,
|
||||
width: 330.w,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10.h),
|
||||
color: AppColor.primaryColor2),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Try Again",
|
||||
style: GoogleFonts.dmSans(
|
||||
color: AppColor.plainWhite, fontSize: 20.sp),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
])),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user