Created
September 2, 2024 10:04
-
-
Save CarloTerracciano/0dbaa56ffe66748f83434e896a0c7c67 to your computer and use it in GitHub Desktop.
Generated code from pixels2flutter.dev
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: Center( | |
child: Stack( | |
alignment: Alignment.topRight, | |
children: [ | |
Container( | |
width: 100, | |
height: 100, | |
decoration: BoxDecoration( | |
color: Colors.blue, | |
borderRadius: BorderRadius.circular(20), | |
), | |
), | |
Positioned( | |
top: -10, | |
right: -10, | |
child: Container( | |
width: 50, | |
height: 50, | |
decoration: BoxDecoration( | |
color: Colors.yellow, | |
borderRadius: BorderRadius.circular(15), | |
), | |
child: Center( | |
child: Icon( | |
Icons.close, | |
color: Colors.white, | |
size: 30, | |
), | |
), | |
), | |
), | |
], | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment