var connectivityResult = await (Connectivity().checkConnectivity());
if (connectivityResult == ConnectivityResult.mobile) {
await GlobalConfiguration().loadFromUrl(
"https://raw.githubusercontent.com/TSCSOftware/api/master/api1.json");
return true;
} else if (connectivityResult == ConnectivityResult.wifi) {
return true;
}
return false;
await GlobalConfiguration().loadFromUrl(
"https://myconfig url.com/api1.json");
sendEnglishPosts(mywebadse).then((onValue) {
{
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (context) => MyHomePage()),
(Route<dynamic> route) => false,
);
}
;
}).catchError((onError) {
showColoredToast('Please Check Your Internet Connection & Try again!');
});
initMobileNumberState(){};
double height = MediaQuery.of(context).size.height;
return Scaffold(
body: Container(
decoration: new BoxDecoration(
image: new DecorationImage(
colorFilter: new ColorFilter.mode(
Colors.white.withOpacity(0.45), BlendMode.dstATop),
image: new AssetImage("assets/images/back.png"),
fit: BoxFit.fill,
),
),
child: new Center(
child: Column(
children: <Widget>[
Expanded(
child: Container(
child: Image.asset('assets/images/logo.png'),
height: height / 3,
width: height / 3,
)),
Container(child: CircularProgressIndicator()),
Container(
margin: EdgeInsets.all(8),
padding: const EdgeInsets.all(8.0),
child: Text(
"welcome",
style: TextStyle(
letterSpacing: 3,
color: Colors.red,
fontSize: 20.0,
fontWeight: FontWeight.bold,
fontFamily: 'Poppins'),
),
),
],
)),
));