Created
April 18, 2020 22:39
-
-
Save iambenkay/f1dcd87928689f5f81774d74b03c8233 to your computer and use it in GitHub Desktop.
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'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
theme: ThemeData.dark().copyWith(scaffoldBackgroundColor: Color(0xfff2f2f2)), | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
body: Center( | |
child: MyWidget(), | |
), | |
), | |
); | |
} | |
} | |
class MyWidget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
height: 150, | |
width: 70, | |
decoration: BoxDecoration( | |
borderRadius: BorderRadius.all(Radius.circular(35.0)), | |
color: Color(0xfff2f2f2), | |
boxShadow: <BoxShadow>[ | |
BoxShadow(offset: Offset(4,4), color: Color(0xffcccccc), blurRadius: 5), | |
BoxShadow(offset: Offset(-4,-4), color: Colors.white, blurRadius: 5), | |
] | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment