Created
January 30, 2020 02:58
-
-
Save iktakahiro/dca5606f461e505785d1a03453b2cb92 to your computer and use it in GitHub Desktop.
Neumorphic Card on Flutter
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'; | |
class NeumorphicCard extends StatelessWidget { | |
const NeumorphicCard({Key key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
height: 200, | |
width: 200, | |
decoration: BoxDecoration( | |
borderRadius: const BorderRadius.all( | |
const Radius.circular(12), | |
), | |
border: Border.all( | |
color: const Color.fromRGBO(255, 255, 255, 0.2), | |
), | |
color: const Color.fromRGBO(239, 238, 238, 1), | |
boxShadow: const <BoxShadow>[ | |
BoxShadow( | |
color: Color.fromRGBO(217, 210, 200, 0.51), | |
offset: Offset(6, 6), | |
blurRadius: 16, | |
), | |
BoxShadow( | |
color: Color.fromRGBO(255, 255, 255, 0.83), | |
offset: Offset(-6, -6), | |
blurRadius: 16, | |
), | |
], | |
), | |
child: const Center( | |
child: Text('Neumorphic Card'), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment