Lesson 10
import 'package:flutter/material.dart';
class Lesson10 extends StatefulWidget {
const Lesson10({super.key});
@override
State<Lesson10> createState() => _Lesson10State();
}
class _Lesson10State extends State<Lesson10> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.symmetric(horizontal: 24),
child: Column(
mainAxisAlignment: .center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Email'),
TextFormField(
// obscureText: true, // Пароль скрыть
// obscuringCharacter: 'I', // знак для пароли
//maxLines: 5, // сколько линии можно писать
//maxLength: 3, // ограничение
keyboardType: TextInputType.emailAddress, //
decoration: InputDecoration(
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
//borderSide: BorderSide.none
),
hintText: 'Напишите email',
//helperText: 'Email',
//labelText: 'Напишите email',
suffixIcon: IconButton(
onPressed: () {},
icon: Icon(Icons.remove_red_eye_sharp),
),
prefixIcon: Icon(Icons.email),
),
),
Align(
alignment: Alignment.centerRight,
child: TextButton(
onPressed: () {},
child: Text('Forgot password?'),
),
),
Row(
spacing: 10,
children: [
Expanded(child: Divider()),
Text('Or'),
Expanded(child: Divider()),
],
),
ElevatedButton.icon(
style: ElevatedButton.styleFrom(
minimumSize: Size(double.infinity, 48),
backgroundColor: Colors.white,
side: BorderSide(color: Colors.grey),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12)
)
),
onPressed: () {},
label: Text('Continue with Google'),
icon: Image.asset('assets/leaf.png', height: 20,),
),
Row(
mainAxisAlignment: .center,
children: [
Text("Don't have an account"),
TextButton(onPressed: (){}, child: Text('Sign up'))
],
)
],
),
),
);
}
}Last updated