jonataslaw / get_storage

A fast, extra light and synchronous key-value storage to Get framework
MIT License
369 stars 83 forks source link

storage work in debug mode and not work in release It return null anytime #108

Open markbks123 opened 2 years ago

markbks123 commented 2 years ago

data.forEachIndexed((index, element) {

      if (index == 0 && element.toString() == "LabeledCheckbox-[<0>]") {
        localStorage.write("isTask", index);
      } else if (index == 0 &&
          element.toString() == "LabeledCheckbox-[<1>]") {
        localStorage.write("isAppointmentl", index);
      } else if (index == 0 &&
          element.toString() == "LabeledCheckbox-[<2>]") {
        localStorage.write("isTeam", index);
      } else if (index == 0 &&
          element.toString() == "LabeledCheckbox-[<3>]") {
        localStorage.write("isWork", index);
      } else if (index == 1 &&
          element.toString() == "LabeledCheckbox-[<0>]") {
        localStorage.write("isTask", index);
      } else if (index == 1 &&
          element.toString() == "LabeledCheckbox-[<1>]") {
        localStorage.write("isAppointmentl", index);
      } else if (index == 1 &&
          element.toString() == "LabeledCheckbox-[<2>]") {
        localStorage.write("isTeam", index);
      } else if (index == 1 &&
          element.toString() == "LabeledCheckbox-[<3>]") {
        localStorage.write("isWork", index);
      } else if (index == 2 &&
          element.toString() == "LabeledCheckbox-[<0>]") {
        localStorage.write("isTask", index);
      } else if (index == 2 &&
          element.toString() == "LabeledCheckbox-[<1>]") {
        localStorage.write("isAppointmentl", index);
      } else if (index == 2 &&
          element.toString() == "LabeledCheckbox-[<2>]") {
        localStorage.write("isTeam", index);
      } else if (index == 2 &&
          element.toString() == "LabeledCheckbox-[<3>]") {
        localStorage.write("isWork", index);
      } else if (index == 3 &&
          element.toString() == "LabeledCheckbox-[<0>]") {
        localStorage.write("isTask", index);
      } else if (index == 3 &&
          element.toString() == "LabeledCheckbox-[<1>]") {
        localStorage.write("isAppointmentl", index);
      } else if (index == 3 &&
          element.toString() == "LabeledCheckbox-[<2>]") {
        localStorage.write("isTeam", index);
      } else if (index == 3 &&
          element.toString() == "LabeledCheckbox-[<3>]") {
        localStorage.write("isWork", index);
      }
      print("isTask === ${localStorage.read("isTask")} ");
      print("isAppointmentl === ${localStorage.read("isAppointmentl")} ");
      print("isTeam === ${localStorage.read("isTeam")} ");
      print("isWork === ${localStorage.read("isWork")} ");
    });
  });
}
markbks123 commented 2 years ago

void main() async { await setupEnvironment(AppEnvironment.uat); await GetStorage.init(); await App.initialize(); runApp(App()); }

markbks123 commented 2 years ago

I/flutter ( 6330): isTask === null I/flutter ( 6330): isAppointmentl === null I/flutter ( 6330): isTeam === null I/flutter ( 6330): isWork === null I/flutter ( 6330): isTask === null I/flutter ( 6330): isAppointmentl === null I/flutter ( 6330): isTeam === null I/flutter ( 6330): isWork === null I/flutter ( 6330): isTask === null I/flutter ( 6330): isAppointmentl === null I/flutter ( 6330): isTeam === null I/flutter ( 6330): isWork === null I/flutter ( 6330): isTask === null I/flutter ( 6330): isAppointmentl === null I/flutter ( 6330): isTeam === null I/flutter ( 6330): isWork === null I/flutter ( 6330): Task enabled === null I/flutter ( 6330): Appointmentl enabled === null I/flutter ( 6330): keysAsc == [0, 1, 2, 3] I/flutter ( 6330): getactivityUsecase