This commit is contained in:
Alessandro Autiero
2024-05-20 17:24:00 +02:00
parent 7c2caed16c
commit 9f5590d41c
562 changed files with 3303 additions and 156787 deletions

View File

@@ -1,6 +1,4 @@
import 'package:fluent_ui/fluent_ui.dart';
import 'package:reboot_launcher/src/dialog/abstract/info_bar.dart' as messenger;
import 'package:reboot_launcher/src/page/abstract/page_setting.dart';
import 'package:reboot_launcher/src/page/abstract/page_type.dart';
abstract class RebootPage extends StatefulWidget {
@@ -14,9 +12,7 @@ abstract class RebootPage extends StatefulWidget {
int get index => type.index;
List<PageSetting> get settings;
bool get hasButton;
bool hasButton(String? pageName);
@override
RebootPageState createState();
@@ -49,21 +45,9 @@ abstract class RebootPageState<T extends RebootPage> extends State<T> with Autom
);
}
OverlayEntry showInfoBar(dynamic text, {InfoBarSeverity severity = InfoBarSeverity.info, bool loading = false, Duration? duration = snackbarShortDuration, Widget? action}) => messenger.showInfoBar(
text,
pageType: widget.type,
severity: severity,
loading: loading,
duration: duration,
action: action
);
ListView get _listView => ListView.builder(
itemCount: settings.length * 2,
itemBuilder: (context, index) => index.isEven ? Align(
alignment: Alignment.center,
child: settings[index ~/ 2],
) : const SizedBox(height: 8.0),
itemCount: settings.length,
itemBuilder: (context, index) => settings[index],
);
@override