-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstack_tutorial.dart
57 lines (55 loc) · 1.46 KB
/
stack_tutorial.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import 'package:flutter/material.dart';
class StackTutorial extends StatelessWidget {
const StackTutorial({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.teal,
title: const Text(
'Stack Tutorial',
style: TextStyle(
color: Colors.white,
),
),
centerTitle: true,
),
body: Stack(
clipBehavior: Clip.none,
children: [
Container(
height: 200,
color: Colors.teal,
),
Positioned(
bottom: -30,
left: 0,
right: 0,
child: Container(
width: 100,
height: 100,
decoration: const BoxDecoration(
color: Colors.tealAccent,
gradient: LinearGradient(
colors: [
Colors.red,
Colors.yellow,
],
end: Alignment.centerLeft,
begin: Alignment.centerRight,
),
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: Colors.greenAccent,
spreadRadius: 100,
blurRadius: 0,
),
]),
),
),
],
),
);
}
}