Solian/lib/widgets/common_wrapper.dart

21 lines
500 B
Dart
Raw Normal View History

2024-04-12 16:38:20 +00:00
import 'package:flutter/material.dart';
import 'package:solian/widgets/navigation_drawer.dart';
class LayoutWrapper extends StatelessWidget {
final Widget? child;
final String title;
2024-04-12 16:38:20 +00:00
const LayoutWrapper({super.key, this.child, required this.title});
2024-04-12 16:38:20 +00:00
@override
Widget build(BuildContext context) {
return Scaffold(
drawer: const SolianNavigationDrawer(),
appBar: AppBar(title: Text(title)),
2024-04-14 07:58:27 +00:00
body: SafeArea(
child: child ?? Container(),
),
2024-04-12 16:38:20 +00:00
);
}
}