Files
kasir-grosir/lib/widgets/template_screen.dart

35 lines
705 B
Dart

import 'package:flutter/material.dart';
class TemplateScreen extends StatelessWidget {
final String title;
final Widget body;
final List<Widget>? actions;
final FloatingActionButton? fab;
final Widget? drawer;
const TemplateScreen({
Key? key,
required this.title,
required this.body,
this.actions,
this.fab,
this.drawer,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(title),
actions: actions,
),
drawer: drawer,
body: Padding(
padding: const EdgeInsets.all(16.0),
child: body,
),
floatingActionButton: fab,
);
}
}