0

since last night I’ve been having the problem that my Flutter project can no longer be built because I’m getting compile errors in IntelliJ.

My code looks as follows

class GuestBookingDetailController extends GetxController {
 final loading = true.obs;
 final storage = GetStorage();
 final guestBookingService = GuestBookingService();
 final localStorageService = LocalStorageService();
 final RxInt selectedIndex = 0.obs;
 final booking = Rxn<BookingDto>();
 @override
 void onInit() {
 super.onInit();
 fetchBooking();
 }
 void logout() {
 storage.remove('accessToken');
 storage.remove('refreshToken');
 Get.offAllNamed('/guest/login');
 }
 void fetchBooking() async {
 final guestNumber = localStorageService.getUsername();
 loading.value = true;
 try {
 final result = await guestBookingService.fetchBooking(guestNumber: guestNumber);
 if (result.isSuccess) {
 booking.value = result.data;
 }
 } finally {
 loading.value = false;
 }
 }
}

I declare and initialize the variable final loading = true.obs;

Further down, I assign new values to the variable.

loading.value = true;

Exactly at this point and further down, I’m getting the error for all GetX variables.

There isn't a setter named 'value' in class 'RxObjectMixin'.

I performed the following steps to try to resolve the issue, but unfortunately without success:

  • Cleared IntelliJ cache
  • Ran flutter upgrade
  • Ran flutter clean and flutter pub get
  • Flutter downgrade
  • Checked out the project again

Unfortunately, none of these steps were able to solve the problem.

The issue just appeared out of nowhere — I was developing, and it suddenly happened last night.

My pubspec.yaml looks as follows:

name: booking_manager_app
description: "A new Flutter project."
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
 sdk: ^3.5.4
dependencies:
 flutter:
 sdk: flutter
 flutter_localizations:
 sdk: flutter
 cupertino_icons: ^1.0.8
 get: ^4.7.2
 dio: ^5.8.0+1
 app_links: ^6.4.0
 get_storage: ^2.1.1
 jwt_decoder: ^2.0.1
 image_picker: ^1.1.2
 intl: ^0.20.2
 table_calendar: ^3.2.0
 signature: ^6.3.0
dev_dependencies:
 flutter_test:
 sdk: flutter
 flutter_lints: ^4.0.0
flutter:
 uses-material-design: true
 assets:
 - assets/images/room.png

Does anyone have an idea what could be causing this or know of a possible solution? I really don’t want to have to throw the project away and start developing it all over again.

asked Oct 24 at 11:23
8
  • Yes, it’s still happening. I created a new project with VS Code, and it’s happening there as well. Commented Oct 24 at 13:19
  • i just tried the code and no errors, flutter version 3.38.0-0.1.pre, what do you have in <pub_root>/get-4.7.2/lib/get_rx/src/rx_types/rx_core/rx_impl.dart, line 98? Commented Oct 24 at 13:30
  • This is my version Flutter 3.35.7 • channel stable • github.com/flutter/flutter.git Framework • revision adc9010625 (3 days ago) • 2025年10月21日 14:16:03 -0400 Engine • hash 6b24e1b529bc46df7ff397667502719a2a8b6b72 (revision 035316565a) (2 days ago) • 2025年10月21日 14:28:01.000Z Tools • Dart 3.9.2 • DevTools 2.48.0 In line 98 I have this code: set xvalue(T val) { if (subject.isClosed) return; sentToStream = false; if (_value == val && !firstRebuild) return; firstRebuild = false; _value = val; sentToStream = true; subject.add(_value); } Commented Oct 24 at 20:36
  • set xvalue(? hmmm, why x? are you sure you did not touch it by mistake? to fix it i would just remove the whole folder <pub_root>/get-4.7.2 and reinstall getx Commented Oct 24 at 20:49
  • off topic: any reason for using this 'weird' state management package? I recently found signals and state_beacon very handy for providing reactive data Commented Oct 24 at 20:53

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.