flutter-form-builder-ecosystem / flutter_form_builder

Simple form maker for Flutter Framework
https://pub.dev/packages/flutter_form_builder
MIT License
1.47k stars 534 forks source link

TextField : Greyed Out in Release Mode #1300

Open vickygidvir opened 11 months ago

vickygidvir commented 11 months ago

Is there an existing issue for this?

Package/Plugin version

9.1.0

Platforms

Flutter doctor

[✓] Flutter (Channel stable, 3.13.1, on macOS 13.5 22G74 darwin-arm64, locale en-IN) • Flutter version 3.13.1 on channel stable at /Users/cleverex/FlutterDev/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision e1e47221e8 (5 weeks ago), 2023-08-22 21:43:18 -0700 • Engine revision b20183e040 • Dart version 3.1.0 • DevTools version 2.25.0 [!] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc1) • Android SDK at /Users/cleverex/Library/Android/sdk • Platform android-33, build-tools 33.0.0-rc1 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763) ✗ Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details. [✓] Xcode - develop for iOS and macOS (Xcode 15.0) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15A240d • CocoaPods version 1.12.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2021.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763) [✓] VS Code (version 1.76.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.60.0 [✓] VS Code (version 1.72.2) • VS Code at /Users/cleverex/Downloads/Visual Studio Code 2.app/Contents • Flutter extension version 3.60.0 [✓] Connected device (2 available) • macOS (desktop) • macos • darwin-arm64 • macOS 13.5 22G74 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 117.0.5938.132 [✓] Network resources • All expected network resources are available. ! Doctor found issues in 1 category.

Minimal code example

Code sample ```dart import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; class CustomTextField extends StatelessWidget { final TextEditingController controller; final bool isEnabled; CustomTextField({ required this.controller, this.isEnabled = true, }); @override Widget build(BuildContext context) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( 'Project ID', style: TextStyle( color: Colors.black, // You can replace this with your color logic ), ), SizedBox( height: 5, ), SizedBox( height: 40, width: 200, child: InkWell( hoverColor: Colors.transparent, onTap: () {}, onHover: (_) {}, child: TextFormField( onChanged: (value) {}, enabled: isEnabled, controller: controller, decoration: InputDecoration( hintText: 'Enter Project Id', filled: true, isDense: true, contentPadding: const EdgeInsets.all(10), fillColor: Colors.white, // You can replace this with your color logic hintStyle: TextStyle( color: Colors.black, // You can replace this with your color logic fontSize: 14, ), enabledBorder: OutlineInputBorder( borderSide: BorderSide( color: Colors.grey, // You can replace this with your color logic width: 1, ), ), focusedBorder: OutlineInputBorder( borderSide: BorderSide( color: Colors.grey, // You can replace this with your color logic width: 1, ), ), disabledBorder: OutlineInputBorder( borderSide: BorderSide( color: Colors.grey, // You can replace this with your color logic width: 1, ), ), ), style: TextStyle( color: Colors.black, // You can replace this with your color logic fontSize: 14, ), inputFormatters: [ FilteringTextInputFormatter.digitsOnly, ], ), ), ), ], ); } } void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: Center( child: Positioned( top: 50, left: 0, // Replace this with your getElementX logic child: CustomTextField( controller: TextEditingController(), isEnabled: true, // Replace this with your iselement_23Enabled logic ), ), ), ), ); } } ```

Current Behavior

The text field appears greyed out, making it look disabled.

also i get errors in console like other

main.dart.js:33883 Another exception was thrown: Instance of 'minified:j4'

Uncaught TypeError: null: type 'minified:EO' is not a subtype of type 'List' at Object.h (main.dart.js:4904:19) at Object.b5K (main.dart.js:5608:18) at kw.blk [as a] (main.dart.js:5603:3) at main.dart.js:116202:12 at aTi.a (main.dart.js:6259:62) at aTi.$2 (main.dart.js:48029:14) at aSk.$1 (main.dart.js:48023:21) at aKj.aFK (main.dart.js:48877:34) at aKj.Py (main.dart.js:48879:21) at aFz.$0 (main.dart.js:48410:11)

Expected Behavior

The textfield should be displayed with normal, non-greyed-out text with No errors in console.

Steps To Reproduce

  1. Import the flutter_form_builder package into your Flutter project.
  2. Create a FormBuilderTextField widget with a FormBuilder.
  3. Run the app in release mode in flutter.

Aditional information

Look some textfield below are been greyed-out (Planned Finish Date, Planned Start Date)

Screenshot 2023-09-28 at 2 23 57 PM
deandreamatias commented 11 months ago

Hi @vickygidvir Please update the issue with flutter doctor and minimal example code. By other way, try to do the same with a TextField native Flutter

vickygidvir commented 11 months ago

Hello @deandreamatias

I have updated the issue with flutter doctor and minimal example code.

Below is the screenshot of same with a Textfield native flutter and it work totally fine.

Screenshot 2023-09-29 at 11 38 23 AM
vickygidvir commented 11 months ago

Hello @deandreamatias is there any update regarding this issue?

deandreamatias commented 11 months ago

@vickygidvir I don't have a lot time to solve the issue and I have a lot to solve... When I can, I will try solve

TimoSchmuck commented 7 months ago

Same issue here. In debug everything is working fine. Only on web release it is appearing. This issue appeared when we the flutter and FormBuilder versions. Before the same code was working fine. In my case I was using FormBuilderField, that I modified to create a multi selection field.