import 'package:ambito/src/packages/ambito_theme/ambito_theme.dart';
import 'package:flutter/material.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';

class FormBuilderFieldsText {
  static Widget build(
    AmbitoTheme theme,
    String name,
    String label,
    String? initial,
  ) {
    return FormBuilderTextField(
      name: name,
      initialValue: initial,
      decoration: InputDecoration(
        fillColor: theme.currentColorScheme.onPrimary,
        labelText: label,
        filled: true,
        hintText: label,
        border: OutlineInputBorder(
          borderRadius: BorderRadius.circular(8),
        ),
      ),
    );
  }
}
