Commit d90cd96c authored by Dio Maulana's avatar Dio Maulana

memperbaiki struktur

parent c4c60993
import 'package:flutter/material.dart';
import 'package:second_display/helper/config.dart';
import 'package:second_display/main.dart';
import 'package:second_display/ui/settings/input_base_url.dart';
class ErrorPage extends StatelessWidget {
ErrorPage({Key? key}) : super(key: key);
......@@ -33,46 +34,55 @@ class ErrorPage extends StatelessWidget {
color: Colors.black,
decoration: TextDecoration.none),
),
Row(
const SizedBox(
height: 15,
),
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Your Base Url: ",
style: TextStyle(
fontSize: MediaQuery.of(context).size.height * 0.02,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
color: Colors.black,
decoration: TextDecoration.none),
),
Text(
baseUrls ?? urlDefault,
style: TextStyle(
fontSize: MediaQuery.of(context).size.height * 0.02,
fontWeight: FontWeight.w500,
color: Colors.red,
decoration: TextDecoration.none),
Container(
margin: EdgeInsets.only(top: 5, bottom: 5),
child: Text(
baseUrls ?? urlDefault,
style: TextStyle(
fontSize: MediaQuery.of(context).size.height * 0.02,
fontWeight: FontWeight.w500,
color: Colors.red,
decoration: TextDecoration.none),
),
),
],
),
(ipAddress != 'Not Found')
? Row(
? Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Your IP Address: ",
style: TextStyle(
fontSize: MediaQuery.of(context).size.height * 0.02,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
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),
Container(
margin: EdgeInsets.only(top: 5, bottom: 5),
child: Text(
ipAddress,
style: TextStyle(
fontSize: MediaQuery.of(context).size.height * 0.02,
fontWeight: FontWeight.w500,
color: Colors.red,
decoration: TextDecoration.none),
),
),
],
)
......@@ -81,7 +91,7 @@ class ErrorPage extends StatelessWidget {
height: 0,
),
(wifiName != 'Not Found')
? Row(
? Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
......@@ -92,13 +102,16 @@ class ErrorPage extends StatelessWidget {
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),
Container(
margin: EdgeInsets.only(top: 5, bottom: 5),
child: Text(
wifiName,
style: TextStyle(
fontSize: MediaQuery.of(context).size.height * 0.02,
fontWeight: FontWeight.w500,
color: Colors.red,
decoration: TextDecoration.none),
),
),
],
)
......@@ -123,7 +136,12 @@ class ErrorPage extends StatelessWidget {
),
ElevatedButton.icon(
onPressed: () {
Navigator.pushNamed(context, '/inputbase');
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) => const InputBaseUrl(),
),
);
},
icon: const Icon(Icons.input_outlined),
label: const Text("Input base Url"))
......
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