update 251028 - L02
This commit is contained in:
43
lib/pages/login.dart
Normal file
43
lib/pages/login.dart
Normal file
@@ -0,0 +1,43 @@
|
||||
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,
|
||||
),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user