Commit d90cd96c authored by Dio Maulana's avatar Dio Maulana

memperbaiki struktur

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