preVersionfinish
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../controller/home_controller.dart';
|
||||
|
||||
class DashboardView extends StatelessWidget {
|
||||
const DashboardView({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var hCtrl = Get.find<HomeController>();
|
||||
return Center(
|
||||
child: Container(
|
||||
margin: const EdgeInsets.all(20),
|
||||
width: 1000,
|
||||
child: Wrap(
|
||||
spacing: 20,
|
||||
runSpacing: 20,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
hCtrl.changeView(MainView.dashboard);
|
||||
},
|
||||
child: Image.asset('assets/images/AskiDashboard.png',width: 450),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
hCtrl.changeView(MainView.traun);
|
||||
},
|
||||
child: Image.asset('assets/images/AskiTraun.png',width: 450),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
hCtrl.changeView(MainView.sarleinsbach);
|
||||
},
|
||||
child: Image.asset('assets/images/AskiSarleinsbach.png',width: 450),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
hCtrl.changeView(MainView.lannach);
|
||||
},
|
||||
child: Image.asset('assets/images/AskiLannach.png',width: 450),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../controller/home_controller.dart';
|
||||
|
||||
class LannachView extends StatelessWidget {
|
||||
const LannachView({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var hCtrl = Get.find<HomeController>();
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('PV Lannach'),
|
||||
centerTitle: true,
|
||||
backgroundColor: Colors.blueGrey,
|
||||
foregroundColor: Colors.white,
|
||||
titleTextStyle: const TextStyle(fontSize: 30, color: Colors.white),
|
||||
iconTheme: const IconThemeData(size: 30, color: Colors.white),
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () {
|
||||
hCtrl.changeView(MainView.dashboard);
|
||||
},
|
||||
)
|
||||
),
|
||||
body: const Center(
|
||||
child: Text(
|
||||
"PV Lannach",
|
||||
style: TextStyle(fontSize: 30),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../controller/home_controller.dart';
|
||||
|
||||
class SarleinsbachView extends StatelessWidget {
|
||||
const SarleinsbachView({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var hCtrl = Get.find<HomeController>();
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('PV Sarleinsbach'),
|
||||
centerTitle: true,
|
||||
backgroundColor: Colors.blueGrey,
|
||||
foregroundColor: Colors.white,
|
||||
titleTextStyle: const TextStyle(fontSize: 30, color: Colors.white),
|
||||
iconTheme: const IconThemeData(size: 30, color: Colors.white),
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () {
|
||||
hCtrl.changeView(MainView.dashboard);
|
||||
},
|
||||
)
|
||||
),
|
||||
body: const Center(
|
||||
child: Text(
|
||||
"PV Sarleinsbach",
|
||||
style: TextStyle(fontSize: 30),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../controller/home_controller.dart';
|
||||
|
||||
class SettingsView extends StatelessWidget {
|
||||
const SettingsView({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var hCtrl = Get.find<HomeController>();
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Data Settings'),
|
||||
centerTitle: true,
|
||||
backgroundColor: Colors.blueGrey,
|
||||
foregroundColor: Colors.white,
|
||||
titleTextStyle: const TextStyle(fontSize: 30, color: Colors.white),
|
||||
iconTheme: const IconThemeData(size: 30, color: Colors.white),
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () {
|
||||
hCtrl.changeView(MainView.dashboard);
|
||||
},
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.save),
|
||||
onPressed: () {
|
||||
// Save the login URL to the controller
|
||||
hCtrl.saveSettings();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(18.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(height: 10),
|
||||
Text(
|
||||
"Please enter User and Password",
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
TextField(
|
||||
controller: hCtrl.askiUserController.value,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'Input User',
|
||||
border: OutlineInputBorder(),
|
||||
hintText: 'Enter ASKI User',
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
TextField(
|
||||
controller: hCtrl.askiPasswordController.value,
|
||||
obscureText: true,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'Input Password',
|
||||
border: OutlineInputBorder(),
|
||||
hintText: 'Enter ASKI Password',
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
Text(
|
||||
"Please enter the URLs for the ASKI login and power data",
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
TextField(
|
||||
controller: hCtrl.loginUrlController.value,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'Login URL',
|
||||
border: OutlineInputBorder(),
|
||||
hintText: 'Enter ASKI Login URL',
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
TextField(
|
||||
controller: hCtrl.powerUrlController.value,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'Power URL',
|
||||
border: OutlineInputBorder(),
|
||||
hintText: 'Enter ASKI Power URL',
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
Text(
|
||||
"Please enter the device for PV Traun and PV Sarleinsbach and PV Lannach",
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
TextField(
|
||||
controller: hCtrl.pvTraunDeviceController.value,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'PV Traun Device',
|
||||
border: OutlineInputBorder(),
|
||||
hintText: 'Enter PV Traun Device',
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../controller/home_controller.dart';
|
||||
|
||||
class TraunView extends StatelessWidget {
|
||||
const TraunView({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var hCtrl = Get.find<HomeController>();
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('PV Traun'),
|
||||
centerTitle: true,
|
||||
backgroundColor: Colors.blueGrey,
|
||||
foregroundColor: Colors.white,
|
||||
titleTextStyle: const TextStyle(fontSize: 30, color: Colors.white),
|
||||
iconTheme: const IconThemeData(size: 30, color: Colors.white),
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
onPressed: () {
|
||||
hCtrl.changeView(MainView.dashboard);
|
||||
},
|
||||
)
|
||||
),
|
||||
body: const Center(
|
||||
child: Text(
|
||||
"PV Traun",
|
||||
style: TextStyle(fontSize: 30),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user