픽사베이에 가니 인공지능이 그린 그림들이 많이 나오고 있다.
이번에 사용한 그림도 인공지능이 그린그림이다.
import 'dart:ui';
import 'package:flutter/material.dart';
class MorphLogIn extends StatefulWidget {
const MorphLogIn({super.key});
@override
State<MorphLogIn> createState() => _MorphLogInState();
}
class _MorphLogInState extends State<MorphLogIn> {
@override
Widget build(BuildContext context) {
double height = MediaQuery.sizeOf(context).height;
double width = MediaQuery.sizeOf(context).width;
return Scaffold(
appBar: AppBar(title: Text('Morph LoginForm')),
body: Container(
height: height,
width: width,
decoration: const BoxDecoration(
color: Colors.white,
image: DecorationImage(
image: NetworkImage('https://cdn.pixabay.com/photo/2023/10/30/06/35/ai-generated-8351955_640.png'),
fit: BoxFit.fill,
),
),
child: Center(
child: ClipRRect(
borderRadius: BorderRadius.circular(16.0),
child: BackdropFilter(
filter: ImageFilter.blur(
sigmaX: 4,
sigmaY: 4,
),
child: Container(
height: height * 0.55,
width: height * 0.5,
padding: EdgeInsets.symmetric(horizontal: width * 0.04),
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.1),
borderRadius: BorderRadius.circular(16.0),
border: Border.all(
color: Colors.white,
width: 1.0,
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
/// heading
SizedBox(height: height * 0.024),
Text(
'Log In',
style: TextStyle(
fontSize: height * 0.03,
color: Colors.white,
fontWeight: FontWeight.w700,
),
),
/// email field
SizedBox(height: height * 0.03),
TextFormField(
cursorColor: Colors.white,
style: const TextStyle(
fontSize: 16,
color: Colors.white,
),
decoration: InputDecoration(
hintText: 'Enter your email',
hintStyle: TextStyle(
fontSize: 12,
color: Colors.white.withOpacity(0.5),
),
contentPadding: const EdgeInsets.symmetric(horizontal: 0),
border: UnderlineInputBorder(
borderSide: BorderSide(
color: Colors.white.withOpacity(0.3),
width: 1.0,
),
),
focusedBorder: const UnderlineInputBorder(
borderSide: BorderSide(
color: Colors.white,
width: 1.0,
),
),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Colors.white.withOpacity(0.3),
width: 1.0,
),
),
),
),
/// password field
SizedBox(height: height * 0.005),
TextFormField(
cursorColor: Colors.white,
style: const TextStyle(
fontSize: 16,
color: Colors.white,
),
obscureText: true,
decoration: InputDecoration(
hintText: 'Enter your password',
hintStyle: TextStyle(
fontSize: 12,
color: Colors.white.withOpacity(0.5),
),
contentPadding: const EdgeInsets.symmetric(horizontal: 0),
border: UnderlineInputBorder(
borderSide: BorderSide(
color: Colors.white.withOpacity(0.3),
width: 1.0,
),
),
focusedBorder: const UnderlineInputBorder(
borderSide: BorderSide(
color: Colors.white,
width: 1.0,
),
),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Colors.white.withOpacity(0.3),
width: 1.0,
),
),
),
),
///
SizedBox(height: height * 0.02),
const Align(
alignment: Alignment.centerRight,
child: Text(
'Forgot Password?',
style: TextStyle(
fontSize: 14,
color: Colors.white,
fontWeight: FontWeight.w500,
),
),
),
/// btn
SizedBox(height: height * 0.04),
ElevatedButton(
onPressed: () {},
style: ElevatedButton.styleFrom(
minimumSize: Size.fromHeight(height * 0.058),
),
child: const Center(
child: Text(
'Login',
style: TextStyle(
fontWeight: FontWeight.w700,
color: Colors.white,
fontSize: 16,
),
),
),
),
///
SizedBox(height: height * 0.016),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'Don\'t have an account?',
style: TextStyle(
fontSize: 10,
color: Colors.white.withOpacity(0.6),
),
),
const SizedBox(width: 5.0),
const Text(
'Register',
style: TextStyle(
fontSize: 10,
color: Colors.white,
fontWeight: FontWeight.w500,
),
),
],
),
],
),
),
),
),
),
),
);
}
}
'Ui' 카테고리의 다른 글
Ui 배경화면 설정에서 그라디언트까지, set Background (0) | 2023.12.17 |
---|---|
Simple note Ui (1) | 2023.12.15 |
Ui login design (0) | 2023.12.12 |
Design Glass Morphism 로그인 (0) | 2023.12.12 |
CustumClipper 로그인 페이지 디자인. (0) | 2023.12.11 |