Commit 126f410d authored by Dio Maulana's avatar Dio Maulana

nambah informasi IP addres dan nama wifi

parent 3f82b992
......@@ -6,6 +6,8 @@ class ErrorPage extends StatelessWidget {
ErrorPage({Key? key}) : super(key: key);
final String? baseUrls = prefs.getString('base_url');
final String ipAddress = prefs.getString('ipAddress') ?? "Not Found";
final String wifiName = prefs.getString('wifiName') ?? "Not Found";
@override
Widget build(BuildContext context) {
return Container(
......@@ -52,6 +54,58 @@ class ErrorPage extends StatelessWidget {
),
],
),
(ipAddress != 'Not Found')
? Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Your IP Address: ",
style: TextStyle(
fontSize: MediaQuery.of(context).size.height * 0.02,
fontWeight: FontWeight.w500,
color: Colors.black,
decoration: TextDecoration.none),
),
Text(
ipAddress,
style: TextStyle(
fontSize: MediaQuery.of(context).size.height * 0.02,
fontWeight: FontWeight.w500,
color: Colors.red,
decoration: TextDecoration.none),
),
],
)
: const SizedBox(
width: 0,
height: 0,
),
(wifiName != 'Not Found')
? Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"WIFI SSID: ",
style: TextStyle(
fontSize: MediaQuery.of(context).size.height * 0.02,
fontWeight: FontWeight.w500,
color: Colors.black,
decoration: TextDecoration.none),
),
Text(
wifiName,
style: TextStyle(
fontSize: MediaQuery.of(context).size.height * 0.02,
fontWeight: FontWeight.w500,
color: Colors.red,
decoration: TextDecoration.none),
),
],
)
: const SizedBox(
width: 0,
height: 0,
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.05,
),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment