mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-14 03:32:23 +01:00
9.0.4
This commit is contained in:
42
gui/lib/src/widget/info_bar_area.dart
Normal file
42
gui/lib/src/widget/info_bar_area.dart
Normal file
@@ -0,0 +1,42 @@
|
||||
import 'package:fluent_ui/fluent_ui.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:reboot_launcher/src/page/pages.dart';
|
||||
|
||||
class InfoBarArea extends StatefulWidget {
|
||||
const InfoBarArea({super.key});
|
||||
|
||||
@override
|
||||
State<InfoBarArea> createState() => InfoBarAreaState();
|
||||
}
|
||||
|
||||
class InfoBarAreaState extends State<InfoBarArea> {
|
||||
final Rx<List<Widget>> _children = Rx([]);
|
||||
|
||||
void insertChild(Widget child) {
|
||||
_children.value.add(child);
|
||||
_children.refresh();
|
||||
}
|
||||
|
||||
bool removeChild(Widget child) {
|
||||
final result = _children.value.remove(child);
|
||||
_children.refresh();
|
||||
return result;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Obx(() => Padding(
|
||||
padding: EdgeInsets.only(
|
||||
bottom: hasPageButton ? 72.0 : 16.0
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: _children.value.map((child) => Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 12.0
|
||||
),
|
||||
child: child
|
||||
)).toList(growable: false)
|
||||
),
|
||||
));
|
||||
}
|
||||
Reference in New Issue
Block a user