You seem to use "context" inside the constructor and it is not properly defined at this point. Therefore the build fails to compile with the following error:
56 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Launching lib/main.dart on Web Server in debug mode...
Waiting for connection from debug service on Web Server...
lib/components/text_field_widget.dart:13:478: Error: Undefined name 'context'.
const TextFieldWidget({super.key , bool?label,bool?helper,String?hint,String?value,this.leading_icon,bool?leading_icon_present,this.trailing_icon,bool?trailing_icon_present,Color?bg,double?radius,String?variant,bool?error, }) : this.label=label??false,this.helper=helper??false,this.hint=hint??'name@example.com',this.value=value??'',this.leading_icon_present=leading_icon_present??true,this.trailing_icon_present=trailing_icon_present??false,this.bg=bg??FlutterFlowTheme.of(context).primaryBackground,this.radius=radius??32.0,this.variant=variant??'outlined',this.error=error??false;
^^^^^^^
lib/components/text_field_widget.dart:13:475: Error: Method invocation is not a constant expression.
const TextFieldWidget({super.key , bool?label,bool?helper,String?hint,String?value,this.leading_icon,bool?leading_icon_present,this.trailing_icon,bool?trailing_icon_present,Color?bg,double?radius,String?variant,bool?error, }) : this.label=label??false,this.helper=helper??false,this.hint=hint??'name@example.com',this.value=value??'',this.leading_icon_present=leading_icon_present??true,this.trailing_icon_present=trailing_icon_present??false,this.bg=bg??FlutterFlowTheme.of(context).primaryBackground,this.radius=radius??32.0,this.variant=variant??'outlined',this.error=error??false;
^^
Side quest: I wanted to manually remove the bg property in the FlutterFlow editor and after doing so, it does not let me save it saying "Current parameters are not properly set.". How do i know what is going wrong?
It should build.
IT4Wz8jf5ZdIseVD1s+MbcJFmiMvNmY6a7grl8N9dEgjfLauBIwPXPykP1doTcOiTFZYMFv9hTgJ7tqMvtrXEOQHA0itGaZfzblhEQnwcDqtVJCwEbiVdHN6HftjJEuV0cHYsBBNPvRuSVlm3WD3euitUhTDJoDUCkUNHP2jOoPD+GziAhm6Xn0Jg1ZSfCvr
It just fails. No real picture needed.
- FlutterFlow version: 6.6.82
- Platform: Test Mode. Probably Web?
- Browser name and version: Chrome (fully patched)
- Operating system and version affected: MacOS
Can we access your project?
Current Behavior
You seem to use "context" inside the constructor and it is not properly defined at this point. Therefore the build fails to compile with the following error:
Side quest: I wanted to manually remove the bg property in the FlutterFlow editor and after doing so, it does not let me save it saying "Current parameters are not properly set.". How do i know what is going wrong?
Expected Behavior
It should build.
Steps to Reproduce
Reproducible from Blank
Bug Report Code (Required)
IT4Wz8jf5ZdIseVD1s+MbcJFmiMvNmY6a7grl8N9dEgjfLauBIwPXPykP1doTcOiTFZYMFv9hTgJ7tqMvtrXEOQHA0itGaZfzblhEQnwcDqtVJCwEbiVdHN6HftjJEuV0cHYsBBNPvRuSVlm3WD3euitUhTDJoDUCkUNHP2jOoPD+GziAhm6Xn0Jg1ZSfCvr
Visual documentation
It just fails. No real picture needed.
Environment
Additional Information
No response