import 'package:flutter/material.dart'; import 'package:gap/gap.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:pharmacy_mobile/widgets/dropdown_widget.dart'; class InputWidget extends StatelessWidget { final String label; final TextEditingController controller; final bool? password; final OnChangedCallback? onChanged; const InputWidget({super.key, required this.label, required this.controller, this.password, this.onChanged}); @override Widget build(BuildContext context) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text('$label:', style: GoogleFonts.outfit( textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: 12, fontWeight: FontWeight.w500), )), const Gap(8), TextField( controller: controller, decoration: InputDecoration( filled: true, // Enable filling the background fillColor: const Color.fromRGBO(255, 255, 255, 1), border: OutlineInputBorder(borderRadius: BorderRadius.circular(8)), contentPadding: const EdgeInsets.symmetric(vertical: 10, horizontal: 24)), style: GoogleFonts.outfit(textStyle: const TextStyle(color: Color.fromRGBO(0, 0, 0, 1), fontSize: 16)), obscureText: password ?? false, onChanged: onChanged, ), ], ); } }