Created
January 29, 2020 21:18
-
-
Save korchix/170909ba5a25b8544ef29a3b09feedbb to your computer and use it in GitHub Desktop.
simple neumorphism icon 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
import 'package:payment_app/constants.dart'; | |
void main() { | |
return runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', | |
theme: ThemeData( | |
primarySwatch: Colors.blue, | |
), | |
home: Scaffold( | |
backgroundColor: Colors.grey.shade300, | |
body: MainCard(), | |
), | |
); | |
} | |
} | |
class MainCard extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Padding( | |
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 80), | |
child: Center( | |
child: Container( | |
height: 150, | |
width: 150, | |
child: Icon( | |
Icons.android, | |
size: 100, | |
), | |
decoration: BoxDecoration( | |
color: Colors.grey.shade300, | |
borderRadius: BorderRadius.circular(20), | |
boxShadow: [ | |
BoxShadow( | |
color: Colors.grey.shade500, | |
offset: Offset(4, 4), | |
blurRadius: 15, | |
spreadRadius: 1), | |
BoxShadow( | |
color: Colors.white, | |
offset: Offset(-4, -4), | |
blurRadius: 15, | |
spreadRadius: 1) | |
], | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment