Kasir Grosir: starter Flutter POS (scaffold awal)
This commit is contained in:
51
lib/screens/pos.dart
Normal file
51
lib/screens/pos.dart
Normal file
@@ -0,0 +1,51 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../widgets/template_screen.dart';
|
||||
import '../widgets/app_drawer.dart';
|
||||
|
||||
class PosScreen extends StatelessWidget {
|
||||
const PosScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TemplateScreen(
|
||||
title: 'POS',
|
||||
drawer: const AppDrawer(),
|
||||
fab: FloatingActionButton(
|
||||
onPressed: () {},
|
||||
tooltip: 'New Transaction',
|
||||
child: const Icon(Icons.add),
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
Card(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Row(
|
||||
children: const [
|
||||
Icon(Icons.search),
|
||||
SizedBox(width: 8),
|
||||
Expanded(child: TextField(decoration: InputDecoration.collapsed(hintText: 'Search products'))),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Expanded(
|
||||
child: GridView.builder(
|
||||
itemCount: 12,
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 0.9),
|
||||
itemBuilder: (context, i) {
|
||||
return Card(
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
child: Center(child: Text('Product ${i + 1}', textAlign: TextAlign.center)),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user