Skip to content

Instantly share code, notes, and snippets.

@korchix
Created January 29, 2020 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save korchix/170909ba5a25b8544ef29a3b09feedbb to your computer and use it in GitHub Desktop.
Save korchix/170909ba5a25b8544ef29a3b09feedbb to your computer and use it in GitHub Desktop.
simple neumorphism icon 2
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