33 lines
1,020 B
Dart
33 lines
1,020 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:gap/gap.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
class InputWidget extends StatelessWidget {
|
|
final String label;
|
|
final TextEditingController controller;
|
|
final bool? password;
|
|
|
|
const InputWidget({super.key, required this.label, required this.controller, this.password});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(label,
|
|
style: GoogleFonts.outfit(
|
|
textStyle: const TextStyle(color: Colors.white, fontSize: 16),
|
|
)),
|
|
const Gap(8),
|
|
TextField(
|
|
controller: controller,
|
|
decoration: InputDecoration(
|
|
border: OutlineInputBorder(borderRadius: BorderRadius.circular(10)),
|
|
),
|
|
style: GoogleFonts.outfit(textStyle: TextStyle(color: Colors.white, fontSize: 16)),
|
|
obscureText: password ?? false,
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|