Skip to content

Instantly share code, notes, and snippets.

@iktakahiro
Created January 30, 2020 02:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iktakahiro/dca5606f461e505785d1a03453b2cb92 to your computer and use it in GitHub Desktop.
Save iktakahiro/dca5606f461e505785d1a03453b2cb92 to your computer and use it in GitHub Desktop.
Neumorphic Card on Flutter
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