SimpleCloudNotifier/flutter/lib/components/layout/scaffold.dart

33 lines
733 B
Dart
Raw Normal View History

2024-05-21 23:20:34 +02:00
import 'package:flutter/material.dart';
import 'package:simplecloudnotifier/components/layout/app_bar.dart';
class SCNScaffold extends StatelessWidget {
2024-05-23 17:41:51 +02:00
const SCNScaffold({
Key? key,
required this.child,
this.title,
this.showThemeSwitch = true,
this.showDebug = true,
this.showSearch = true,
}) : super(key: key);
2024-05-21 23:20:34 +02:00
final Widget child;
final String? title;
2024-05-23 17:41:51 +02:00
final bool showThemeSwitch;
final bool showDebug;
final bool showSearch;
2024-05-21 23:20:34 +02:00
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: SCNAppBar(
title: title,
2024-05-23 17:41:51 +02:00
showThemeSwitch: showThemeSwitch,
showDebug: showDebug,
showSearch: showSearch,
2024-05-21 23:20:34 +02:00
),
body: child,
);
}
}