当前位置:网站首页>Build a short video platform and copy a demo of the login interface
Build a short video platform and copy a demo of the login interface
2022-04-21 17:57:00 【Cloudleopard network technology】
Construction of short video platform , Copy a login interface demo
Program running root directory
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
/// root directory Activity ViewController
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: MyHomePage(),
);
}
Default home page
/// Load the displayed homepage by default
class MyHomePage extends StatefulWidget {
const MyHomePage({
Key? key}) : super(key: key);
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
/// The user name uses
late final TextEditingController _nameController = TextEditingController();
/// The password input box uses
late final TextEditingController _passwordController =
TextEditingController();
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
width: double.infinity,
height: double.infinity,
child: Stack(
children: [
// first floor Background image
buildFunction1(),
// The second floor Gaussian blur
buildFunction2(),
// The third level Login input layer
buildFunction3(),
],
),
),
);
}
... ... Here is the corresponding method block
}
A background image of
buildFunction1() {
return Positioned.fill(
child: Image.asset(
"images/loginbg.png",
fit: BoxFit.fill,
),
);
}
Gaussian blur
buildFunction2() {
return Positioned.fill(
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 3, sigmaY: 3),
child: Container(
color: Colors.white.withOpacity(0.4),
),
),
);
}
Login input layer
buildFunction3() {
return Positioned.fill(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: 300,
child: TextField(
controller: _nameController,
decoration: const InputDecoration(
hintText: " Please enter a user name ",
border: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(33)),
borderSide: BorderSide(
color: Colors.grey,
),
),
),
),
),
const SizedBox(height: 20),
SizedBox(
width: 300,
child: TextField(
controller: _passwordController,
decoration: const InputDecoration(
hintText: " Please input a password ",
border: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(33)),
borderSide: BorderSide(
color: Colors.grey,
),
),
),
),
),
const SizedBox(height: 40),
SizedBox(
width: 300,
height: 48,
child: ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(33)),
child: ElevatedButton(
onPressed: () {
String name = _nameController.text;
String password = _passwordController.text;
print(" The content obtained is $name $password");
},
child: const Text(" Sign in "),
),
),
)
],
),
);
}
That's all Construction of short video platform , Copy a login interface demo, More content welcome to follow the article
版权声明
本文为[Cloudleopard network technology]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204211731001982.html
边栏推荐
- Google has been unable to collect the transformation target on the mobile terminal. What's the matter?
- LogStash~LogStash的多个输入输出
- Online examination of "financial law" in the computer examination of Northwest University of Technology
- 【最佳实践】巡检项:对象存储(COS)存储桶公有读写
- Do we media sidelines really earn tens of thousands a month? This article is shared without privacy
- 5000 movie datasets from tmdb
- 游戏合作伙伴专题:BreederDAO 与 Crypto Unicorns 建立合作伙伴关系
- 关于无线DOS攻击的常用方法简述
- Introduction to MySQL ODBC driver
- Shell编程学习(三)条件判断、流程控制
猜你喜欢

Oceanbase 和 TiDB 粗浅对比之 - 执行计划

What is ODBC – open database connectivity

Zhongang Mining: a new and active application field of fluorite resources

Linux~libc. so. 6 (glibc_2.28) (64bit) is redis-5.0.3-1 nfs. x86_ 64 required

【Redis】 使用Redis优化省份展示数据不显示

舱内视觉AI应用前装「同比增长近200%」,哪些供应商领跑中国市场

The conflict between Russia and Ukraine raised concerns. The five eye network security department suggested that allies strengthen the protection of key infrastructure

Mysql database common sense storage engine

Dynamic programming: coin topic summary

华为URPF
随机推荐
Pytorch数据封装进入网络前的几种方式
百度地图、腾讯地图、高德地图经纬度转换
LogStash~LogStash的input(input)
Logstash ~ input of logstash (input)
It is claimed that MNIST and cifar 10 have been "solved" and 100% accuracy has been achieved
西北工业大学机考《财政金融法》网考
吃了这个开源小玩意让单片机开发和Arduino一样高效
Graphic drawing in MATLAB
The conflict between Russia and Ukraine raised concerns. The five eye network security department suggested that allies strengthen the protection of key infrastructure
怎么获取map值才不那么low,获取map参数的三种方式
MySQL的默认用户名和密码的什么?
上位机这样玩,才有意思!
Mysql database common sense storage engine
LogStash~LogStash的配置文件
【acwing】165. 小猫爬山(DFS之剪枝)
Educational Codeforces Round 116 (Rated for Div. 2) E. Arena
用户发送请求到执行controller方法的过程发生了什么
There is a prize for essay | a heavy prize of 5000 yuan. You are invited to contribute
LogStash~LogStash的目录布局
京准GPS北斗卫星校时系统助力南亚电子生产管理系统