title: How to make drop down reusable in flutter
body: <p>I want to make this dropdown reusable. when I want to use it. I need to simply just called that dropdown and pass the value. Hope you understand the question :)</p>
  
  <p>Here is some code I've tried.</p>
  
  <pre><code>FormBuilder(
        key: _fbKey,
        autovalidate: true,
        initialValue: {
          'country': 5,
        },
        child: FormBuilderCustomField(
          attribute: "name",
          validators: [
            FormBuilderValidators.required(),
          ],
          formField: FormField(
            // key: _fieldKey,
            enabled: true,
            builder: (FormFieldState&lt;dynamic&gt; field) {
              return InputDecorator(
                decoration: InputDecoration(
                  labelText: "Select Country",
                  contentPadding: EdgeInsets.only(top: 10.0, bottom: 0.0),
                  border: InputBorder.none,
                  errorText: field.errorText,
                ),
                child: DropdownButton(
                  isExpanded: true,
                  items: ["One", "Two"].map((option) {
                    return DropdownMenuItem(
                      child: Text("$option"),
                      value: option,
                    );
                  }).toList(),
                  value: field.value,
                  onChanged: (value) {
                    field.didChange(value);
                  },
                ),
              );
            },
          ),
        ),
      );
  </code></pre>