Kasir Grosir: starter Flutter POS (scaffold awal)
This commit is contained in:
34
lib/widgets/template_screen.dart
Normal file
34
lib/widgets/template_screen.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
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,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user