Skip to content

Instantly share code, notes, and snippets.

@fladago
Created August 5, 2021 15:19
Show Gist options
  • Save fladago/a45f6f7da9b6aeac6d0d3657fc06c9da to your computer and use it in GitHub Desktop.
Save fladago/a45f6f7da9b6aeac6d0d3657fc06c9da to your computer and use it in GitHub Desktop.
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