added local db
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
import '../../../app/providers.dart';
|
||||
import '../../../core/router/app_router.dart';
|
||||
import '../../../core/theme/app_colors.dart';
|
||||
import '../../../core/theme/app_dimens.dart';
|
||||
import '../../../core/theme/app_layout.dart';
|
||||
@@ -29,6 +27,8 @@ class PageHeader extends ConsumerWidget {
|
||||
final module = ref.watch(activeModuleProvider);
|
||||
final now = ref.watch(clockProvider).value ?? DateTime.now();
|
||||
final compact = layout.sidebarIsDrawer;
|
||||
// Status chrome is the first thing dropped when width gets tight.
|
||||
final showStatus = MediaQuery.sizeOf(context).width >= 1180;
|
||||
|
||||
return Container(
|
||||
constraints: const BoxConstraints(minHeight: AppSizes.headerHeight),
|
||||
@@ -75,7 +75,7 @@ class PageHeader extends ConsumerWidget {
|
||||
|
||||
const Spacer(),
|
||||
|
||||
if (!compact) ...[
|
||||
if (showStatus) ...[
|
||||
const _LivePill(),
|
||||
const SizedBox(width: AppSpacing.lg),
|
||||
Text(
|
||||
@@ -250,7 +250,7 @@ class _ParkedBillsButton extends ConsumerWidget {
|
||||
builder: (_) => AlertDialog(
|
||||
title: const Text('Parked bills'),
|
||||
content: SizedBox(
|
||||
width: 380,
|
||||
width: (MediaQuery.sizeOf(context).width - 96).clamp(280.0, 380.0),
|
||||
child: ListView.separated(
|
||||
shrinkWrap: true,
|
||||
itemCount: parked.length,
|
||||
@@ -297,7 +297,10 @@ class _NewSaleButton extends ConsumerWidget {
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
void start() {
|
||||
ref.read(cartControllerProvider.notifier).reset();
|
||||
context.go(AppRoutes.welcome);
|
||||
ref.read(activeModuleProvider.notifier).state = PosModule.pos;
|
||||
ScaffoldMessenger.of(context)
|
||||
..hideCurrentSnackBar()
|
||||
..showSnackBar(const SnackBar(content: Text('Started a new sale.')));
|
||||
}
|
||||
|
||||
if (compact) {
|
||||
|
||||
Reference in New Issue
Block a user