44 lines
1.0 KiB
Dart
44 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lhj_flutter/const.dart';
|
|
|
|
class LoginPage extends StatelessWidget {
|
|
const LoginPage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: backgroundColor,
|
|
body: Stack(
|
|
children: [
|
|
_buildTextField(
|
|
icon: Icons.people_outline,
|
|
hintText: 'Username',
|
|
isDarkMode: isDarkMode,
|
|
inputBackgroundColor: inputBackgroundColor,
|
|
subtleTextColor: subtleTextColor,
|
|
textColor: textColor,
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
Widget _buildTextField({
|
|
required IconData icon,
|
|
required String hintText,
|
|
bool obscureText = false,
|
|
required bool isDarkMode,
|
|
required Color inputBackgroundColor,
|
|
required Color subtleTextColor,
|
|
required Color textColor,
|
|
}) {
|
|
return TextField(
|
|
obscureText: obscureText,
|
|
decoration: InputDecoration(
|
|
contentPadding: const EdgeInsets.symmetric(vertical: 20),
|
|
hintText: hintText,
|
|
),
|
|
);
|
|
}
|