52 lines
1.5 KiB
Dart
52 lines
1.5 KiB
Dart
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)),
|
|
),
|
|
);
|
|
},
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|