Simple custom function works on debug but not on android (APK)

Custom Code

Hello,

I have a very simple function that returns a string value based on the value of a slider.

import 'dart:convert';
import 'dart:math' as math;

import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:intl/intl.dart';
import 'package:timeago/timeago.dart' as timeago;
import '/flutter_flow/lat_lng.dart';
import '/flutter_flow/place.dart';
import '/flutter_flow/uploaded_file.dart';
import '/flutter_flow/custom_functions.dart';

String? verifValeurSlider(String nomcontrole) {
  /// MODIFY CODE ONLY BELOW THIS LINE

  // verifie la valeur d'un slider et renvoit Mauvais si c'est égal à 1,  Non Concerné si égal à 2, Bon si égal à 3
  switch (nomcontrole) {
    case '1':
      return 'Mauvais';
    case '2':
      return 'Non Concerné';
    case '3':
      return 'Bon';
    default:
      return null;
  }

  /// MODIFY CODE ONLY ABOVE THIS LINE
}

It works perfectly in the FlutterFlow debugger. However, when I export it as an APK and test it on Android, the value does not update.

Do you have any suggestions?

What have you tried so far?

I created an empty project to see if the issue was caused by something else, but it didn’t solve the problem.

Did you check FlutterFlow's Documentation for this topic?
Yes
1