Created
August 5, 2021 15:19
-
-
Save fladago/a45f6f7da9b6aeac6d0d3657fc06c9da 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(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, | |
title: 'Flutter Stack', | |
theme: ThemeData( | |
primarySwatch: Colors.blue, | |
), | |
home: const Scaffold( | |
body: StackWidget(), | |
), | |
); | |
} | |
} | |
class StackWidget extends StatelessWidget { | |
const StackWidget({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return SafeArea( | |
child: Stack( | |
children: [ | |
Align( | |
child: Container( | |
// color: const Color(0xFFABB3FF), //Delete this parameter | |
height: 500, | |
width: 300, | |
decoration: const BoxDecoration( | |
color: Color(0xFFABB3FF), | |
boxShadow: [ | |
BoxShadow( | |
color: Colors.blue, | |
offset: Offset(0, 0), | |
blurRadius: 0, | |
spreadRadius: 0, | |
), | |
], | |
), | |
), | |
), | |
], | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment