update textfield
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:lhj_flutter/const.dart';
|
||||
|
||||
class LoginPage extends StatelessWidget {
|
||||
@@ -10,13 +11,22 @@ class LoginPage extends StatelessWidget {
|
||||
backgroundColor: backgroundColor,
|
||||
body: Stack(
|
||||
children: [
|
||||
_buildTextField(
|
||||
icon: Icons.people_outline,
|
||||
hintText: 'Username',
|
||||
isDarkMode: isDarkMode,
|
||||
inputBackgroundColor: inputBackgroundColor,
|
||||
subtleTextColor: subtleTextColor,
|
||||
textColor: textColor,
|
||||
Container(
|
||||
padding: const EdgeInsets.fromLTRB(24, 32, 24, 8),
|
||||
decoration: BoxDecoration(color: backgroundColor),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
_buildTextField(
|
||||
icon: Icons.person_outline,
|
||||
hintText: 'Username',
|
||||
isDarkMode: isDarkMode,
|
||||
inputBackgroundColor: inputBackgroundColor,
|
||||
subtleTextColor: subtleTextColor,
|
||||
textColor: textColor,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -38,6 +48,21 @@ Widget _buildTextField({
|
||||
decoration: InputDecoration(
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 20),
|
||||
hintText: hintText,
|
||||
hintStyle: GoogleFonts.inter(color: subtleTextColor),
|
||||
prefixIcon: Padding(
|
||||
padding: const EdgeInsets.only(left: 20, right: 12),
|
||||
child: Icon(icon, color: subtleTextColor),
|
||||
),
|
||||
filled: true,
|
||||
fillColor: inputBackgroundColor,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide.none,
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: const BorderSide(color: Color(0xFF137FEC), width: 2),
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user