mirror of
https://github.com/Mercantec-GHC/h4-projekt-gruppe-0-sm.git
synced 2025-04-28 16:54:06 +02:00
31 lines
750 B
Dart
31 lines
750 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class PrimaryInput extends StatelessWidget {
|
|
final double width;
|
|
final double height;
|
|
final String label;
|
|
final String placeholderText;
|
|
final bool obscure;
|
|
|
|
const PrimaryInput(
|
|
{super.key,
|
|
this.width = 300,
|
|
this.height = 100,
|
|
this.obscure = false,
|
|
required this.label,
|
|
required this.placeholderText});
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SizedBox(
|
|
width: width,
|
|
height: height,
|
|
child: TextField(
|
|
decoration: InputDecoration(
|
|
border: const OutlineInputBorder(),
|
|
label: Text(label),
|
|
hintText: placeholderText),
|
|
obscureText: obscure,
|
|
));
|
|
}
|
|
}
|