-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathoverlay_example.dart
41 lines (39 loc) · 1023 Bytes
/
overlay_example.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
import 'package:flutter/material.dart';
class OverlayExample extends StatelessWidget {
const OverlayExample({
super.key,
required this.title,
});
final String title;
@override
Widget build(BuildContext context) {
return SafeArea(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
color: Colors.black.withAlpha(50),
padding: const EdgeInsets.all(8.0),
child: Text(
title,
style: const TextStyle(
color: Colors.white,
decoration: TextDecoration.none,
fontSize: 18.0,
),
),
),
IconButton(
icon: const Icon(Icons.close),
color: Colors.white,
tooltip: 'Close',
onPressed: () {
Navigator.pop(context);
},
),
],
),
);
}
}