Skip to content

Unable to Initialize autocomplete textfield on init method() #79

@iamprakash13

Description

@iamprakash13

I can initialize textfield controller in init function. but can't do with autocomplete textfield. it shows error while running code.

this line:
searchTextField.textField.controller.text = widget.custno;

log:
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The getter 'textField' was called on null. E/flutter (23780): Receiver: null E/flutter (23780): Tried calling: textField E/flutter (23780): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5) E/flutter (23780): #1 _EditBillPageState.setValues.<anonymous closure> package:audit_shop/pages/bill_edit_page.dart:101 E/flutter (23780): #2 State.setState package:flutter/…/widgets/framework.dart:1148 E/flutter (23780): #3 _EditBillPageState.setValues package:audit_shop/pages/bill_edit_page.dart:95 E/flutter (23780): #4 _EditBillPageState.initState

how do I resolve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions