2022-11-28 08:03:13 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2022-12-20 06:26:37 +00:00
|
|
|
import 'package:unit2/theme-data.dart/colors.dart';
|
2022-11-28 08:03:13 +00:00
|
|
|
|
2022-12-05 08:06:45 +00:00
|
|
|
InputDecoration normalTextFieldStyle(String labelText, String hintText) {
|
|
|
|
return InputDecoration(
|
|
|
|
contentPadding: EdgeInsets.fromLTRB(12, 6, 6, 6),
|
|
|
|
floatingLabelBehavior: FloatingLabelBehavior.auto,
|
|
|
|
labelText: labelText,
|
|
|
|
labelStyle: const TextStyle(color: Colors.grey),
|
|
|
|
hintText: hintText,
|
|
|
|
hintStyle: const TextStyle(
|
|
|
|
color: Colors.grey,
|
|
|
|
),
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
borderSide: const BorderSide(
|
|
|
|
width: 1,
|
|
|
|
color: Colors.black87,
|
|
|
|
),
|
|
|
|
borderRadius: BorderRadius.circular(5),
|
|
|
|
),
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
borderSide: const BorderSide(
|
|
|
|
color: Colors.grey,
|
|
|
|
width: 1,
|
|
|
|
),
|
|
|
|
borderRadius: BorderRadius.circular(5),
|
|
|
|
),
|
|
|
|
disabledBorder: OutlineInputBorder(
|
|
|
|
borderSide: const BorderSide(
|
|
|
|
width: 1,
|
|
|
|
color: Colors.grey,
|
|
|
|
),
|
|
|
|
borderRadius: BorderRadius.circular(5),
|
|
|
|
),
|
|
|
|
errorBorder: const OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(
|
|
|
|
color: Colors.red,
|
|
|
|
width: 1,
|
|
|
|
),
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(5)),
|
|
|
|
),
|
|
|
|
focusedErrorBorder: const OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(
|
|
|
|
color: Colors.red,
|
|
|
|
width: 1,
|
|
|
|
),
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(5)),
|
|
|
|
),
|
|
|
|
filled: false);
|
|
|
|
}
|
|
|
|
|
2022-11-28 08:03:13 +00:00
|
|
|
InputDecoration loginTextFieldStyle() {
|
|
|
|
return InputDecoration(
|
|
|
|
floatingLabelBehavior: FloatingLabelBehavior.never,
|
|
|
|
prefixIcon: const Icon(
|
|
|
|
Icons.person,
|
2022-12-20 06:26:37 +00:00
|
|
|
color: primary,
|
2022-11-28 08:03:13 +00:00
|
|
|
),
|
|
|
|
labelText: 'Username',
|
|
|
|
hintText: 'Enter your username...',
|
|
|
|
focusedBorder: OutlineInputBorder(
|
|
|
|
borderSide: const BorderSide(
|
|
|
|
width: 2,
|
|
|
|
color: Colors.black87,
|
|
|
|
),
|
|
|
|
borderRadius: BorderRadius.circular(5),
|
|
|
|
),
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
borderSide: const BorderSide(
|
|
|
|
color: Colors.black87,
|
|
|
|
width: 1,
|
|
|
|
),
|
|
|
|
borderRadius: BorderRadius.circular(5),
|
|
|
|
),
|
|
|
|
errorBorder: const OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(
|
|
|
|
color: Colors.red,
|
|
|
|
width: 2,
|
|
|
|
),
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(5)),
|
|
|
|
),
|
|
|
|
focusedErrorBorder: const OutlineInputBorder(
|
|
|
|
borderSide: BorderSide(
|
|
|
|
color: Colors.red,
|
|
|
|
width: 2,
|
|
|
|
),
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(5)),
|
|
|
|
),
|
|
|
|
filled: false);
|
2022-12-05 08:06:45 +00:00
|
|
|
}
|