81117fbcb7
Co-authored-by: Copilot <copilot@github.com>
84 lines
2.5 KiB
Dart
84 lines
2.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'recipe_import_tab.dart';
|
|
|
|
/// Main import screen with tabs: Recept | Kvitto.
|
|
///
|
|
/// Fas 6a: Recept-fliken är implementerad.
|
|
/// Fas 6b: Kvitto-fliken läggs till i ett senare steg.
|
|
class ImportScreen extends StatefulWidget {
|
|
const ImportScreen({super.key});
|
|
|
|
@override
|
|
State<ImportScreen> createState() => _ImportScreenState();
|
|
}
|
|
|
|
class _ImportScreenState extends State<ImportScreen>
|
|
with SingleTickerProviderStateMixin {
|
|
late final TabController _tabController;
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_tabController = TabController(length: 2, vsync: this);
|
|
}
|
|
|
|
@override
|
|
void dispose() {
|
|
_tabController.dispose();
|
|
super.dispose();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
title: const Text('Importera'),
|
|
bottom: TabBar(
|
|
controller: _tabController,
|
|
tabs: const [
|
|
Tab(icon: Icon(Icons.restaurant_menu_outlined), text: 'Recept'),
|
|
Tab(icon: Icon(Icons.receipt_long_outlined), text: 'Kvitto'),
|
|
],
|
|
),
|
|
),
|
|
body: TabBarView(
|
|
controller: _tabController,
|
|
children: [
|
|
const RecipeImportTab(),
|
|
// Fas 6b — placeholder tills kvitto-flödet är implementerat.
|
|
Center(
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(24),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Icon(
|
|
Icons.construction_outlined,
|
|
size: 48,
|
|
color: Theme.of(context).colorScheme.outline,
|
|
),
|
|
const SizedBox(height: 16),
|
|
Text(
|
|
'Kvittoimport kommer snart',
|
|
style: Theme.of(context).textTheme.titleMedium,
|
|
),
|
|
const SizedBox(height: 8),
|
|
Text(
|
|
'Fotografera eller ladda upp ett kvitto — varorna '
|
|
'läggs till i ditt inventarie.',
|
|
textAlign: TextAlign.center,
|
|
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
|
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|