This commit is contained in:
toly
2023-08-31 07:53:30 +08:00
parent 207bf4f832
commit fcaabb18dd
30 changed files with 794 additions and 30 deletions

36
lib/05/01/main.dart Normal file
View File

@@ -0,0 +1,36 @@
import 'package:flutter/material.dart';
void main() {
runApp(const OverlayPage());
}
class OverlayPage extends StatelessWidget{
const OverlayPage({super.key});
@override
Widget build(BuildContext context) {
final OverlayEntry home = OverlayEntry(builder: (BuildContext context) => const HomePage());
return Directionality(
textDirection: TextDirection.ltr,
child: Overlay(
initialEntries: [home],
),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({super.key});
@override
Widget build(BuildContext context) {
return const ColoredBox(
color: Colors.white,
child: Align(
child: FlutterLogo(size: 60,),
),
);
}
}