Lesson04
// Some code
class Lesson04 extends StatefulWidget {
const Lesson04({super.key});
@override
State<Lesson04> createState() => _Lesson04State();
}
class _Lesson04State extends State<Lesson04> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 24),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(
'assets/logo.png',
height: 18.36,
),
SizedBox(
height: 32,
),
Text(
'Sign In to your\naccount',
style: GoogleFonts.inter(
textStyle: TextStyle(
fontSize: 32,
fontWeight: FontWeight.bold,
),
),
),
SizedBox(
height: 12,
),
Text(
'Enter your email and password to log in ',
style: GoogleFonts.inter(
textStyle: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w500,
color: Color(0xFF6C7278),
),
),
),
SizedBox(
height: 32,
),
Text(
'Email',
style: GoogleFonts.inter(
textStyle: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w500,
color: Color(0xFF6C7278),
),
),
),
TextField(
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: Color(0xFF1A1C1E),
),
decoration: InputDecoration(
border: OutlineInputBorder(),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide(color: Color(0xFF1D61E7), width: 2),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Color(0xFFACB5BB)),
borderRadius: BorderRadius.circular(10),
),
),
),
SizedBox(
height: 16,
),
Text(
'Password',
style: GoogleFonts.inter(
textStyle: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w500,
color: Color(0xFF6C7278),
),
),
),
TextField(
obscureText: true,
obscuringCharacter: '&',
maxLength: 10,
decoration: InputDecoration(
border: OutlineInputBorder(),
prefixIcon: Icon(Icons.lock),
suffixIcon: IconButton(
onPressed: () {},
icon: Icon(Icons.remove_red_eye_sharp),
),
hintText: 'Парольду жаз',
helperText: 'Error',
labelText: 'Password',
),
),
// Переход
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("Don't have an account?"),
TextButton(
onPressed: () {
// KЛЛогика перехода на другой экран
Navigator.push(
context,
MaterialPageRoute(builder: (context) => Lesson04a()),
);
//
},
child: Text('Sign up'),
),
],
),
// Кнопки
ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => Lesson03()),
);
},
child: Text('Отправить'),
),
IconButton(onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => Lesson03d()),
);
}, icon: Icon(Icons.arrow_forward_ios)),
],
),
),
),
);
}
}
Last updated