Created
February 5, 2020 00:12
-
-
Save narenarjun/18b533e16552a211de7da7815579427f to your computer and use it in GitHub Desktop.
This file contains 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( | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
body: SmoothWidget(), | |
), | |
); | |
} | |
} | |
class SmoothWidget extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Center( | |
child: Container( | |
width: 200.0, | |
height: 200.0, | |
decoration: BoxDecoration( | |
borderRadius: BorderRadius.circular(25.0), | |
color: Colors.cyan, | |
border: Border.all(color: Colors.black, width: 6.0), | |
), | |
child: Center( | |
child: Text( | |
"Hello World", | |
style: TextStyle( | |
fontSize: 26.0, | |
fontStyle: FontStyle.italic, | |
fontWeight: FontWeight.bold, | |
color: Colors.amber), | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment