Skip to content

Commit

Permalink
Add splash to icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Ali-Amin committed Aug 2, 2019
1 parent 60a2a88 commit e0d9244
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 27 deletions.
40 changes: 25 additions & 15 deletions lib/common/back_icon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,32 @@ import 'package:flutter/material.dart';
class BackIcon extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SizedBox(
width: 50,
child: Stack(
children: <Widget>[
Center(
child: CircleAvatar(
backgroundColor: Colors.white.withAlpha(60),
),
return Material(
color: Colors.transparent,
child: InkWell(
onTap: () {
Navigator.pop(context);
},
splashColor: Colors.white.withAlpha(60),
borderRadius: BorderRadius.circular(20),
child: SizedBox(
width: 50,
child: Stack(
children: <Widget>[
Center(
child: CircleAvatar(
backgroundColor: Colors.white.withAlpha(60),
),
),
Center(
child: ClipPath(
clipper: HorizontalClipper(),
child: Icon(Icons.arrow_back),
),
),
],
),
Center(
child: ClipPath(
clipper: HorizontalClipper(),
child: Icon(Icons.arrow_back),
),
),
],
),
),
);
}
Expand Down
32 changes: 20 additions & 12 deletions lib/common/drawer_icon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,27 @@ import 'package:flutter/material.dart';
class DrawerIcon extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SizedBox(
width: 50,
child: Stack(
children: <Widget>[
Center(
child: CircleAvatar(
backgroundColor: Colors.white.withAlpha(60),
),
return Material(
color: Colors.transparent,
child: InkWell(
onTap: () {},
splashColor: Colors.white.withAlpha(60),
borderRadius: BorderRadius.circular(20),
child: SizedBox(
width: 50,
child: Stack(
children: <Widget>[
Center(
child: CircleAvatar(
backgroundColor: Colors.white.withAlpha(60),
),
),
Center(
child: Icon(Icons.menu),
),
],
),
Center(
child: Icon(Icons.menu),
),
],
),
),
);
}
Expand Down

0 comments on commit e0d9244

Please sign in to comment.