Flutter 带颤振的掩模图像
我怎样才能用颤振创造出这样的东西?我想用图像填充灰色容器Flutter 带颤振的掩模图像,flutter,flutter-layout,Flutter,Flutter Layout,我怎样才能用颤振创造出这样的东西?我想用图像填充灰色容器 返回安全区( 孩子:脚手架( 钥匙:_scaffoldKey, 正文:SingleChildScrollView( 子:列( 儿童:[ 堆叠( 溢出:overflow.clip, 儿童:[ 克利帕斯( 裁剪器:CustomShapeClipper(), 子:容器( 高度:MediaQuery.of(context).size.height/2.6, 宽度:double.infinity, 颜色:Colors.blue.shade300,
返回安全区(
孩子:脚手架(
钥匙:_scaffoldKey,
正文:SingleChildScrollView(
子:列(
儿童:[
堆叠(
溢出:overflow.clip,
儿童:[
克利帕斯(
裁剪器:CustomShapeClipper(),
子:容器(
高度:MediaQuery.of(context).size.height/2.6,
宽度:double.infinity,
颜色:Colors.blue.shade300,
儿童:中心(
child:Offstage(),
),
),
),
克利帕斯(
裁剪器:CustomShapeClipper2(),
子:容器(
高度:MediaQuery.of(context).size.height/2.6-10,
宽度:double.infinity,
颜色:颜色,蓝色,
子级:中心(子级:后台()),
),
),
定位(
左:-90,
前-90,
子:容器(
高度:MediaQuery.of(context).size.height/3,
宽度:MediaQuery.of(context).size.width/1.7,
对齐:对齐.center,
装饰:盒子装饰(
颜色:Colors.blue.shade300,
形状:长方形。圆形),
子:容器(
身高:60,
宽度:60,
装饰:盒子装饰(
颜色:Colors.blue,形状:BoxShape.circle),
child:Offstage(),
)),
),
定位(
右:-120,
前-100名,
子:容器(
高度:MediaQuery.of(context).size.height/2.5,
宽度:MediaQuery.of(context).size.width/1.2,
对齐:对齐.center,
装饰:盒子装饰(
颜色:Colors.blue.shade300,
形状:长方形。圆形),
子:容器(
身高:60,
宽度:60,
装饰:盒子装饰(
颜色:Colors.blue,形状:BoxShape.circle),
child:Offstage(),
)),
),
填充物(
填充:仅限常量边集(顶部:15.0),
儿童:中心(
子:Image.asset(
“assets/images/loginimage.png”,
宽度:MediaQuery.of(context).size.width/1,
高度:MediaQuery.of(context).size.height/5,
colorBlendMode:BlendMode.colorBurn,
)),
)
],
),
形式(
键:_formKey,
子:列(
儿童:[
填充物(
填充:仅限常量边集(顶部:15.0),
子:容器(
宽度:MediaQuery.of(context).size.width/1.2,
子项:TextFormField(
验证器:(字符串值){
if(value.isEmpty){
返回“请输入电话号码”;
}else if(value.length!=10){
返回“请输入有效电话号码”;
}否则{
返回null;
}
},
控制员:流动,,
键盘类型:TextInputType.phone,
输入格式化程序:[
WhiteListingDeputFormatter.digitsOnly,
长度限制文本输入格式化程序(10),
],
textInputAction:textInputAction.done,
装饰:输入装饰(
labelText:'手机号码',
内容填充:
来自LTRB(0.0,15.0,0.0,15.0)的边缘集,
hintText:'手机号码',
hintStyle:TextStyle(颜色:Colors.grey),
前缀:图标(
Icons.phone,
颜色:颜色。灰色,
),
边框:大纲输入边框(
边界半径:边界半径。圆形(25.0)),
),
),
),
//填充物(
//填充:仅限常量边集(顶部:15.0),
//子:容器(
//宽度:MediaQuery.of(context).size.width/1.2,
//子项:TextFormField(
//验证器:(字符串值){
//if(value.isEmpty){
//返回“请输入密码”;
//}else if(value.length<6){
//返回“密码必须有6个字符”;
//}其他{
//返回null;
// }
// },
//控制器:用户密码,
//蒙昧文字:对,
//textInputAction:textInputAction.done,
//focusNode:fpassword,
//装饰:输入装饰(
//labelText:“密码”,
//hintText:'输入您的密码',
//内容填充:
//LTRB(0.0,15.0,0.0,15。
return SafeArea(
child: Scaffold(
key: _scaffoldKey,
body: SingleChildScrollView(
child: Column(
children: <Widget>[
Stack(
overflow: Overflow.clip,
children: <Widget>[
ClipPath(
clipper: CustomShapeClipper(),
child: Container(
height: MediaQuery.of(context).size.height / 2.6,
width: double.infinity,
color: Colors.blue.shade300,
child: Center(
child: Offstage(),
),
),
),
ClipPath(
clipper: CustomShapeClipper2(),
child: Container(
height: MediaQuery.of(context).size.height / 2.6 - 10,
width: double.infinity,
color: Colors.blue,
child: Center(child: Offstage()),
),
),
Positioned(
left: -90,
top: -90,
child: Container(
height: MediaQuery.of(context).size.height / 3,
width: MediaQuery.of(context).size.width / 1.7,
alignment: Alignment.center,
decoration: BoxDecoration(
color: Colors.blue.shade300,
shape: BoxShape.circle),
child: Container(
height: 60,
width: 60,
decoration: BoxDecoration(
color: Colors.blue, shape: BoxShape.circle),
child: Offstage(),
)),
),
Positioned(
right: -120,
top: -100,
child: Container(
height: MediaQuery.of(context).size.height / 2.5,
width: MediaQuery.of(context).size.width / 1.2,
alignment: Alignment.center,
decoration: BoxDecoration(
color: Colors.blue.shade300,
shape: BoxShape.circle),
child: Container(
height: 60,
width: 60,
decoration: BoxDecoration(
color: Colors.blue, shape: BoxShape.circle),
child: Offstage(),
)),
),
Padding(
padding: const EdgeInsets.only(top: 15.0),
child: Center(
child: Image.asset(
'assets/images/loginimage.png',
width: MediaQuery.of(context).size.width / 1,
height: MediaQuery.of(context).size.height / 5,
colorBlendMode: BlendMode.colorBurn,
)),
)
],
),
Form(
key: _formKey,
child: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.only(top: 15.0),
child: Container(
width: MediaQuery.of(context).size.width / 1.2,
child: TextFormField(
validator: (String value) {
if (value.isEmpty) {
return "Please enter phone number";
} else if (value.length != 10) {
return "Please enter valid Phone number";
} else {
return null;
}
},
controller: mobile,
keyboardType: TextInputType.phone,
inputFormatters: [
WhitelistingTextInputFormatter.digitsOnly,
LengthLimitingTextInputFormatter(10),
],
textInputAction: TextInputAction.done,
decoration: InputDecoration(
labelText: 'Mobile No.',
contentPadding:
EdgeInsets.fromLTRB(0.0, 15.0, 0.0, 15.0),
hintText: 'Mobile No.',
hintStyle: TextStyle(color: Colors.grey),
prefixIcon: Icon(
Icons.phone,
color: Colors.grey,
),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(25.0))),
),
),
),
// Padding(
// padding: const EdgeInsets.only(top: 15.0),
// child: Container(
// width: MediaQuery.of(context).size.width / 1.2,
// child: TextFormField(
// validator: (String value) {
// if (value.isEmpty) {
// return "Please enter password";
// } else if (value.length < 6) {
// return "Password must have 6 character";
// } else {
// return null;
// }
// },
// controller: userPassword,
// obscureText: true,
// textInputAction: TextInputAction.done,
// focusNode: fpassword,
// decoration: InputDecoration(
// labelText: 'Password',
// hintText: 'Enter your password',
// contentPadding:
// EdgeInsets.fromLTRB(0.0, 15.0, 0.0, 15.0),
// hintStyle: TextStyle(color: Colors.grey),
// prefixIcon: Icon(
// Icons.security,
// color: Colors.grey,
// ),
// border: OutlineInputBorder(
// borderRadius: BorderRadius.circular(25.0))),
// ),
// ),
// ),
],
),
),
Padding(
padding: EdgeInsets.only(
top: 50,
bottom: 10,
left: MediaQuery.of(context).size.width / 10.0,
right: MediaQuery.of(context).size.width / 10.0),
child: ButtonTheme(
minWidth: MediaQuery.of(context).size.width / 1.2,
height: MediaQuery.of(context).size.height / 12,
child: RaisedButton(
onPressed: () {
if (_formKey.currentState.validate() == true) {
_checkinternet().then((onValue) {
if (onValue == true) {
setState(() {
buttonAction = true;
buttonText = spintool;
});
verifyPhone();
// signInWithEmail();
}
});
}
},
color: Colors.blue,
child: buttonText,
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(30.0))),
),
),
Padding(
padding: EdgeInsets.only(
top: 5,
),
child: ButtonTheme(
minWidth: MediaQuery.of(context).size.width / 1.2,
height: MediaQuery.of(context).size.height / 12,
child: FlatButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ChatSignUpPage()));
},
child: Text(
'SignUp',
style: TextStyle(
color: Colors.blue,
),
),
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(30.0))),
),
)
],
),
),
),
);