Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:credical/utile_size.dart';
- import 'package:flutter/material.dart';
- import 'package:flutter/services.dart';
- import 'package:flutter_svg/flutter_svg.dart';
- class NoInternetConnection extends StatefulWidget {
- //
- static String routeName = "/noInternetConnection";
- //
- const NoInternetConnection({super.key});
- @override
- State<NoInternetConnection> createState() => _NoInternetConnectionState();
- }
- class _NoInternetConnectionState extends State<NoInternetConnection> {
- @override
- Widget build(BuildContext context) {
- SystemChrome.setSystemUIOverlayStyle(
- SystemUiOverlayStyle(
- statusBarColor: Colors.transparent,
- ),
- );
- SizeConfig().init(context);
- Size size = MediaQuery.of(context).size;
- return Scaffold(
- body: Column(
- children: [
- Container(
- padding: EdgeInsets.symmetric(
- horizontal: getProportionateScreenWidth(50),
- ),
- height: size.height * 0.45,
- width: size.width,
- child: SvgPicture.asset(
- "assets/ErrorPics/Connectivity 01.svg",
- ),
- ),
- Text(
- "No Internet Connection",
- style: TextStyle(
- color: Color(0xFF0f7dff),
- fontSize: getProportionateScreenWidth(22),
- fontWeight: FontWeight.bold,
- ),
- ),
- SizedBox(
- height: getProportionateScreenHeight(10),
- ),
- Text.rich(
- TextSpan(
- children: [
- TextSpan(text: "Check your"),
- TextSpan(
- text: " wifi",
- style: TextStyle(
- fontWeight: FontWeight.bold,
- ),
- ),
- TextSpan(text: " or"),
- TextSpan(
- text: " mobile data",
- style: TextStyle(
- fontWeight: FontWeight.bold,
- ),
- ),
- TextSpan(text: " connection"),
- ],
- style: TextStyle(
- fontSize: getProportionateScreenWidth(14),
- ),
- ),
- ),
- Text(
- "and try again",
- style: TextStyle(
- fontSize: getProportionateScreenWidth(14),
- ),
- ),
- Expanded(
- child: Padding(
- padding: EdgeInsets.only(
- bottom: getProportionateScreenHeight(20),
- ),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.end,
- children: [
- Container(
- margin: EdgeInsets.symmetric(
- horizontal: getProportionateScreenWidth(40),
- ),
- width: size.width,
- height: getProportionateScreenHeight(50),
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(10),
- color: Color(0xFF0f7dff),
- ),
- child: TextButton(
- style: ButtonStyle(
- shape: MaterialStateProperty.all(
- RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(5),
- ),
- ),
- ),
- child: Text(
- "Try Again",
- style: TextStyle(
- color: Colors.white,
- fontSize: getProportionateScreenWidth(16),
- ),
- ),
- onPressed: () {},
- ),
- ),
- ],
- ),
- ),
- )
- ],
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement