I have 5 functions, like the code below. There are over 1500 image urls (files stored on a website). The end goal is a multipage product builder. On one page the user selects and width and height via dropdown widget. There are 430 possibilities with width being 8, 8.5, 9, 9.5 to 14. Then height goes from 8, 8.5 to 9, 9.5 up to 30. Any combination chosen will output a different image representing the size selected.
This would show footprint images. Then on other pages they will see dimension images and final images. The images add up and the code was working. On the last FF update it stopped and FF tells me that the functions are too big. 20k lines of code as the functions essentially are data maps to the files stored on my website.
I am lost for ideas on another way to get the same results and FF recommended I reach out to the community for support.
Let me know your thoughts, happy to answer any questions as I know this does get a bit complicated.
Code snippet:
String? finalFootprintLogicMap(
String? length,
String? width,
String? posts,
) {
/// MODIFY CODE ONLY BELOW THIS LINE
// 4 Posts with Doubled Up Girder
// 4 Posts with Doubled Up Girder
if (posts == "4 Posts with Doubled Up Girder") {
final urlMap4Gir = {
"10.5": {
"14.5":
"Iamge1",
"15":
"Image2",
"15.5":
"Image3",
"16":
"Image4",
"16.5":
"Image4"
}
};
if (urlMap4Gir.containsKey(width) &&
urlMap4Gir[width]!.containsKey(length)) {
return urlMap4Gir[width]![length];
}
return null;
}
I have 5 functions like this, all with around 430 images in each code.
A custom function that got too big. FF says functions not intended for this use.
1
1 reply