My friends and I are doing a project with Flutter.He doens't use any state management method and I want to use Getx.So how can i use Getx without using Getview class so that our both codes work in a harmony?enter image description here
try this...
class MyView extends StatelessWidget {
// you can also put it here
final controller = Get.put(MyController());
@override
Widget build(BuildContext context) {
// you can put it here
final controller = Get.put(MyController());
return Text(
controller.myText.value,
style: Theme.of(context).textTheme.headline4,
);
}
}
either ways try to play with it