import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:get/get.dart'; import 'package:terepi_seged/pages/navigation/presentation/controllers/navigation_controller.dart'; class SettingsDialog extends StatelessWidget { final controller = Get.find(); SettingsDialog({super.key}); @override Widget build(BuildContext context) { return Scaffold( body: ListView( children: [ Padding( padding: const EdgeInsets.all(8.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ IconButton( onPressed: () { controller.vehicleNumber = int.parse(controller.vehicleNumberController.text); Get.back(); }, icon: const Icon(Icons.close)), TextButton( style: ButtonStyle( overlayColor: MaterialStateProperty.all(Colors.transparent)), onPressed: () {}, child: const Text( 'Bezár', style: TextStyle(color: Colors.blue, fontSize: 14.0), )) ], ), ), const Padding( padding: EdgeInsets.symmetric(horizontal: 40.0), child: Text( 'Beállítások', style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold), ), ), const Padding( padding: EdgeInsets.symmetric(horizontal: 40.0), child: Text( 'GPS vevő', style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w500), ), ), Obx(() => Column(children: [ RadioListTile( title: Text('TiGNSS Rover-FF4E'), value: '98:CD:AC:62:FF:4E', groupValue: controller.gpsAddress.value, onChanged: (value) { controller.gpsAddress.value = value!; }), RadioListTile( title: Text('TiGNSS Rover-8BB2'), value: 'E8:31:CD:14:8B:B2', groupValue: controller.gpsAddress.value, onChanged: (value) { controller.gpsAddress.value = value!; ; }), RadioListTile( title: Text('TiGNSS Rover-FF36'), value: '98:CD:AC:62:FF:36', groupValue: controller.gpsAddress.value, onChanged: (value) { controller.gpsAddress.value = value!; }) ])), const Padding( padding: EdgeInsets.symmetric(horizontal: 20), child: Divider( height: 5, ), ), // const SizedBox(height: 5), // const Padding( // padding: EdgeInsets.symmetric(horizontal: 40.0), // child: Text( // 'Bemért pont azonosítója:', // style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w500), // ), // ), // const SizedBox(height: 4), // Padding( // padding: const EdgeInsets.symmetric(horizontal: 40), // child: Row( // children: [ // Flexible( // child: TextField( // controller: controller.pointPrefixController, // decoration: const InputDecoration( // border: OutlineInputBorder(), labelText: 'Előtag'), // ), // ), // const Padding( // padding: EdgeInsets.symmetric(horizontal: 10.0), // child: Text( // 'Eredeti azonosító', // style: TextStyle(fontSize: 12.0), // ), // ), // Flexible( // child: TextField( // controller: controller.pointPostfixController, // decoration: const InputDecoration( // border: OutlineInputBorder(), labelText: 'Utótag'), // ), // ), // ], // ), // ), const SizedBox(height: 5), const Padding( padding: EdgeInsets.symmetric(horizontal: 20.0), child: Text( 'Mérés iránya:', style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w500), ), ), Obx( () => Column(children: [ RadioListTile( title: Text('Növekvő'), value: true, groupValue: controller.pointMeasuringDirectionForward.value, onChanged: (value) { controller.pointMeasuringDirectionForward.value = value!; }), RadioListTile( title: Text('Csökkenő'), value: false, groupValue: controller.pointMeasuringDirectionForward.value, onChanged: (value) { controller.pointMeasuringDirectionForward.value = value!; }) ]), ), const Padding( padding: EdgeInsets.symmetric(horizontal: 20), child: Divider( height: 5, ), ), const SizedBox(height: 4), const Padding( padding: EdgeInsets.symmetric(horizontal: 20.0), child: Text( 'Vibrátor:', style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w500), ), ), SizedBox( height: 40, child: TextField( enableSuggestions: false, autocorrect: false, controller: controller.vehicleNumberController, keyboardType: TextInputType.number, inputFormatters: [FilteringTextInputFormatter.digitsOnly], decoration: const InputDecoration( border: OutlineInputBorder(), labelText: 'Járműszám:', icon: Icon( Icons.numbers, )), ), ), const SizedBox(height: 5), const Padding( padding: EdgeInsets.symmetric(horizontal: 20), child: Divider( height: 5, ), ), const SizedBox(height: 4), const Padding( padding: EdgeInsets.symmetric(horizontal: 20.0), child: Text( 'Ntrip szolgáltatás:', style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w500), ), ), const SizedBox(height: 5), Padding( padding: const EdgeInsets.symmetric(horizontal: 20.0), child: Column(children: [ SizedBox( height: 40, child: TextField( controller: controller.ntripUsernameController, decoration: const InputDecoration( border: OutlineInputBorder(), labelText: 'Felhasználónév', icon: Icon(Icons.account_circle_rounded)), ), ), const SizedBox(height: 10), SizedBox( height: 40, child: TextField( obscureText: true, enableSuggestions: false, autocorrect: false, controller: controller.ntripPasswordController, decoration: const InputDecoration( border: OutlineInputBorder(), labelText: 'Jelszó', icon: Icon( Icons.lock, )), ), ), const SizedBox(height: 20) ]), ), ], ), ); } }