Improve home button inkwell

This commit is contained in:
poka 2021-02-22 08:54:40 +01:00
parent a2a85ce8bb
commit 646b86139b
1 changed files with 102 additions and 65 deletions

View File

@ -147,24 +147,37 @@ class HomeScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Column(children: <Widget>[ Column(children: <Widget>[
ClipOval( Container(
child: ClipOval(
child: Material( child: Material(
color: Color(0xffFFD58D), // button color color: Color(0xffFFD58D), // button color
child: InkWell(
splashColor:
Color(0xffD28928), // inkwell color
child: Padding( child: Padding(
padding: EdgeInsets.all(17), padding: EdgeInsets.all(17),
child: InkWell(
splashColor: Colors.black, // inkwell color
child: Image( child: Image(
image: image: AssetImage(
AssetImage('assets/qrcode-scan.png'), 'assets/qrcode-scan.png'),
height: 58), height: 58)),
onTap: () async { onTap: () async {
await _historyProvider.scan(context); await _historyProvider.scan(context);
}, }),
)),
), ),
), ),
SizedBox(height: 5), decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.grey,
blurRadius: 4.0,
offset: Offset(2.0, 2.5),
spreadRadius: 0.5)
],
),
),
SizedBox(height: 10),
Text( Text(
"Payer par QR-Code", "Payer par QR-Code",
textAlign: TextAlign.center, textAlign: TextAlign.center,
@ -174,27 +187,39 @@ class HomeScreen extends StatelessWidget {
])), ])),
Padding( Padding(
padding: EdgeInsets.only(top: 60), padding: EdgeInsets.only(top: 60),
child: Row( child:
mainAxisAlignment: MainAxisAlignment.center, Row(mainAxisAlignment: MainAxisAlignment.center, children: <
children: <Widget>[ Widget>[
Column(children: <Widget>[ Column(children: <Widget>[
ClipOval( Container(
child: ClipOval(
child: Material( child: Material(
color: Color(0xffFFD58D), // button color color: Color(0xffFFD58D), // button color
child: InkWell(
splashColor: Color(0xffD28928), // inkwell color
child: Padding( child: Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 18, vertical: 14), horizontal: 18, vertical: 14),
child: InkWell(
splashColor: Colors.black, // inkwell color
child: Image( child: Image(
image: image:
AssetImage('assets/blockchain.png'), AssetImage('assets/blockchain.png'),
height: 65), height: 65)),
onTap: () {}, onTap: () {}),
)),
), ),
), ),
SizedBox(height: 5), decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.grey,
blurRadius: 4.0,
offset: Offset(2.0, 2.5),
spreadRadius: 0.5)
],
),
),
SizedBox(height: 10),
Text( Text(
"Explorer\n", "Explorer\n",
textAlign: TextAlign.center, textAlign: TextAlign.center,
@ -203,16 +228,17 @@ class HomeScreen extends StatelessWidget {
]), ]),
SizedBox(width: 140), SizedBox(width: 140),
Column(children: <Widget>[ Column(children: <Widget>[
ClipOval( Container(
child: ClipOval(
child: Material( child: Material(
color: Color(0xffFFD58D), // button color color: Color(0xffFFD58D), // button color
child: InkWell(
splashColor: Color(0xffD28928), // inkwell color
child: Padding( child: Padding(
padding: EdgeInsets.all(20), padding: EdgeInsets.all(20),
child: InkWell(
splashColor: Colors.black, // inkwell color
child: Image( child: Image(
image: AssetImage('assets/lock.png'), image: AssetImage('assets/lock.png'),
height: 50), height: 50)),
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
@ -220,11 +246,22 @@ class HomeScreen extends StatelessWidget {
return WalletsHome(); return WalletsHome();
}), }),
); );
}, }),
)),
), ),
), ),
SizedBox(height: 5), decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.grey,
blurRadius: 4.0,
offset: Offset(2.0, 2.5),
spreadRadius: 0.5)
],
),
),
SizedBox(height: 10),
Text( Text(
"Gérer mes\nportefeuilles", "Gérer mes\nportefeuilles",
textAlign: TextAlign.center, textAlign: TextAlign.center,