181186 - Criar PDV Android para rodar em maquinas P.O.S.

This commit is contained in:
felipe.franca committed 2026-11-17 17:43:00 -03:00
commit c9983cbad5
204 files changed
+11453

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
import 'package:flutter/material.dart';
class AppButton extends StatelessWidget {
const AppButton({
required this.label,
required this.onPressed,
this.icon,
super.key,
});
final String label;
final VoidCallback? onPressed;
final IconData? icon;
@override
Widget build(BuildContext context) {
return FilledButton.icon(
onPressed: onPressed,
icon: Icon(icon ?? Icons.arrow_forward),
label: Text(label),
);
}
}
+34
View File
@@ -0,0 +1,34 @@
import 'package:flutter/material.dart';
class AppTextField extends StatelessWidget {
const AppTextField({
required this.label,
this.controller,
this.obscureText = false,
this.keyboardType,
this.textInputAction,
this.prefixIcon,
super.key,
});
final String label;
final TextEditingController? controller;
final bool obscureText;
final TextInputType? keyboardType;
final TextInputAction? textInputAction;
final IconData? prefixIcon;
@override
Widget build(BuildContext context) {
return TextField(
controller: controller,
obscureText: obscureText,
keyboardType: keyboardType,
textInputAction: textInputAction,
decoration: InputDecoration(
labelText: label,
prefixIcon: prefixIcon == null ? null : Icon(prefixIcon),
),
);
}
}
+33
View File
@@ -0,0 +1,33 @@
import 'package:flutter/material.dart';
class EmptyView extends StatelessWidget {
const EmptyView({
required this.title,
required this.message,
this.icon = Icons.inbox_outlined,
super.key,
});
final String title;
final String message;
final IconData icon;
@override
Widget build(BuildContext context) {
return Center(
child: Padding(
padding: const EdgeInsets.all(24),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Icon(icon, size: 48, color: Theme.of(context).colorScheme.outline),
const SizedBox(height: 12),
Text(title, style: Theme.of(context).textTheme.titleMedium),
const SizedBox(height: 4),
Text(message, textAlign: TextAlign.center),
],
),
),
);
}
}
+41
View File
@@ -0,0 +1,41 @@
import 'package:flutter/material.dart';
class ErrorView extends StatelessWidget {
const ErrorView({
required this.message,
this.onRetry,
super.key,
});
final String message;
final VoidCallback? onRetry;
@override
Widget build(BuildContext context) {
return Center(
child: Padding(
padding: const EdgeInsets.all(24),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.cloud_off_outlined,
size: 40,
color: Theme.of(context).colorScheme.error,
),
const SizedBox(height: 12),
Text(message, textAlign: TextAlign.center),
if (onRetry != null) ...[
const SizedBox(height: 16),
TextButton.icon(
onPressed: onRetry,
icon: const Icon(Icons.refresh),
label: const Text('Tentar novamente'),
),
],
],
),
),
);
}
}
+21
View File
@@ -0,0 +1,21 @@
import 'package:flutter/material.dart';
class LoadingView extends StatelessWidget {
const LoadingView({this.message = 'Carregando...', super.key});
final String message;
@override
Widget build(BuildContext context) {
return Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const CircularProgressIndicator(),
const SizedBox(height: 16),
Text(message),
],
),
);
}
}