Class MyApp extends StatelessWidget { const MyApp({super key})
Download 0.79 Mb.
|
nortoy1999
runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blueGrey, ), home: EditProfileUI(), ); } } class EditProfileUI extends StatefulWidget { const EditProfileUI({Key? key}) : super(key: key); @override State } class _EditProfileUIState extends State bool is0bscurePassword = true; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Hayriddin Normuhammadov'), ), body: Container( padding: EdgeInsets.only(left:15, top:20, right:15), child: GestureDetector( onTap:() { FocusScope.of(context).unfocus(); }, child: ListView( children: [ Center( child: Stack( children: [ Container( width:130, height:130, decoration: BoxDecoration( border: Border.all(width: 4, color: Colors.black12), boxShadow: [ BoxShadow( spreadRadius: 2, blurRadius: 10, color: Colors.black.withOpacity(0.1) ) ], shape: BoxShape.circle, image:const DecorationImage( fit: BoxFit.cover, image: NetworkImage('images/') ), ), ), ] ), ), SizedBox(height: 30), buildTextField("Full Name", "Hayriddin Normuhammatov", false), buildTextField("Data of Brithday" ,"03.01.1999" , false), buildTextField("Tel", "66666666666", false), buildTextField("Student", "Tuit", false), ], ), ), ) ); } Widget buildTextField(String labelText, String placeholder, bool isPasswordTextField) { return Padding( padding:EdgeInsets.only(bottom: 30), child:TextField( obscureText: isPasswordTextField ? is0bscurePassword : false, decoration: InputDecoration( suffixIcon: isPasswordTextField ? IconButton( icon: Icon(Icons.remove_red_eye, color: Colors.grey), onPressed: () {} ): null, contentPadding: EdgeInsets.only(bottom: 5), labelText: labelText, floatingLabelBehavior: FloatingLabelBehavior.always, hintText: placeholder, hintStyle: TextStyle( fontSize: 16, fontWeight: FontWeight.bold, color: Colors.grey, ) ), ), ); } } Download 0.79 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling