Skip to content

Instantly share code, notes, and snippets.

@iambenkay
Created April 18, 2020 22:39
Show Gist options
  • Save iambenkay/f1dcd87928689f5f81774d74b03c8233 to your computer and use it in GitHub Desktop.
Save iambenkay/f1dcd87928689f5f81774d74b03c8233 to your computer and use it in GitHub Desktop.
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