import 'package:fikoyt_tayyi_faal/app/widgets/joystick/flutter_joystick.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import '../controllers/home_controller.dart'; class HomeView extends GetView { const HomeView({super.key}); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('HomeView'), centerTitle: true, ), extendBody: true, body: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, mainAxisSize: MainAxisSize.max, children: [ Expanded( child: Center( child: Joystick( stick: Image.asset("assets/rotate.png"), base: JoystickBase( decoration: JoystickBaseDecoration( color: Colors.grey.shade300, drawOuterCircle: true, ), arrowsDecoration: JoystickArrowsDecoration( color: Colors.transparent, enableAnimation: false, ), ), listener: (details) { if (kDebugMode) { print( details.x.toString() + " " + details.y.toString()); } }, ), ), ), Expanded( child: Center( child: Joystick( stickOffsetCalculator: const RectangleStickOffsetCalculator(), stick: Image.asset("assets/pan.png"), base: JoystickSquareBase( decoration: JoystickBaseDecoration( color: Colors.grey.shade300, drawOuterCircle: true, ), // arrowsDecoration: JoystickArrowsDecoration( // color: Colors.blue, // enableAnimation: false, // ), ), listener: (details) { print(details.x.toString() + " " + details.y.toString()); }, ), ), ), Expanded( child: Center( child: Joystick( mode: JoystickMode.vertical, stick: Image.asset("assets/zoom.png"), base: JoystickSquareBase( mode: JoystickMode.vertical, decoration: JoystickBaseDecoration( color: Colors.grey.shade300, drawOuterCircle: true, ), // arrowsDecoration: JoystickArrowsDecoration( // color: Colors.blue, // enableAnimation: false, // ), ), listener: (details) { print(details.x.toString() + " " + details.y.toString()); }, ), ), ), // GestureWidget( // // onUpdate: (String type, Map values) { // // print('Event: $type, Values: $values'); // // }, // ), ], ), ], ), ); } }