feat: form page
This commit is contained in:
parent
83edfa61f1
commit
d29486571a
@ -63,6 +63,7 @@ class ThemeApp {
|
|||||||
letterSpacing: -0.5,
|
letterSpacing: -0.5,
|
||||||
color: AppColor.white,
|
color: AppColor.white,
|
||||||
),
|
),
|
||||||
|
iconTheme: const IconThemeData(color: AppColor.white),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
470
lib/presentation/components/form/form_page.dart
Normal file
470
lib/presentation/components/form/form_page.dart
Normal file
@ -0,0 +1,470 @@
|
|||||||
|
import 'package:auto_route/auto_route.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:image_picker/image_picker.dart';
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import '../../../common/theme/theme.dart';
|
||||||
|
|
||||||
|
// Model untuk question item
|
||||||
|
class TaskQuestion {
|
||||||
|
final String id;
|
||||||
|
final String question;
|
||||||
|
bool? answer;
|
||||||
|
File? photo;
|
||||||
|
|
||||||
|
TaskQuestion({
|
||||||
|
required this.id,
|
||||||
|
required this.question,
|
||||||
|
this.answer,
|
||||||
|
this.photo,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Model untuk task section
|
||||||
|
class TaskSection {
|
||||||
|
final String title;
|
||||||
|
final List<TaskQuestion> questions;
|
||||||
|
|
||||||
|
TaskSection({required this.title, required this.questions});
|
||||||
|
}
|
||||||
|
|
||||||
|
@RoutePage()
|
||||||
|
class DailyTasksFormPage extends StatefulWidget {
|
||||||
|
const DailyTasksFormPage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<DailyTasksFormPage> createState() => _DailyTasksFormPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _DailyTasksFormPageState extends State<DailyTasksFormPage>
|
||||||
|
with SingleTickerProviderStateMixin {
|
||||||
|
late TabController _tabController;
|
||||||
|
final ImagePicker _picker = ImagePicker();
|
||||||
|
|
||||||
|
// Sample data untuk OPEN dan CLOSING tasks
|
||||||
|
List<TaskSection> taskSections = [
|
||||||
|
TaskSection(
|
||||||
|
title: "OPENING",
|
||||||
|
questions: [
|
||||||
|
TaskQuestion(id: "open_1", question: "Apakah meja sudah dibersihkan?"),
|
||||||
|
TaskQuestion(
|
||||||
|
id: "open_2",
|
||||||
|
question: "Apakah alat kerja sudah disiapkan?",
|
||||||
|
),
|
||||||
|
TaskQuestion(
|
||||||
|
id: "open_3",
|
||||||
|
question: "Apakah ruangan sudah dalam kondisi bersih?",
|
||||||
|
),
|
||||||
|
TaskQuestion(
|
||||||
|
id: "open_4",
|
||||||
|
question: "Apakah penerangan sudah memadai?",
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
TaskSection(
|
||||||
|
title: "CLOSING",
|
||||||
|
questions: [
|
||||||
|
TaskQuestion(
|
||||||
|
id: "close_1",
|
||||||
|
question: "Apakah meja sudah dibersihkan kembali?",
|
||||||
|
),
|
||||||
|
TaskQuestion(
|
||||||
|
id: "close_2",
|
||||||
|
question: "Apakah alat kerja sudah disimpan dengan rapi?",
|
||||||
|
),
|
||||||
|
TaskQuestion(id: "close_3", question: "Apakah lampu sudah dimatikan?"),
|
||||||
|
TaskQuestion(id: "close_4", question: "Apakah pintu sudah dikunci?"),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
];
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_tabController = TabController(length: 2, vsync: this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_tabController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _pickImage(TaskQuestion question) async {
|
||||||
|
try {
|
||||||
|
final XFile? image = await _picker.pickImage(
|
||||||
|
source: ImageSource.camera,
|
||||||
|
maxWidth: 1920,
|
||||||
|
maxHeight: 1080,
|
||||||
|
imageQuality: 85,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (image != null) {
|
||||||
|
setState(() {
|
||||||
|
question.photo = File(image.path);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text('Error mengambil foto: $e'),
|
||||||
|
backgroundColor: AppColor.error,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _removePhoto(TaskQuestion question) {
|
||||||
|
setState(() {
|
||||||
|
question.photo = null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
bool _isFormComplete() {
|
||||||
|
for (var section in taskSections) {
|
||||||
|
for (var question in section.questions) {
|
||||||
|
if (question.answer == null || question.photo == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void _submitForm() {
|
||||||
|
if (!_isFormComplete()) {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
const SnackBar(
|
||||||
|
content: Text('Mohon lengkapi semua pertanyaan dan foto'),
|
||||||
|
backgroundColor: AppColor.error,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Logic untuk submit form
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
const SnackBar(
|
||||||
|
content: Text('Daily tasks berhasil disimpan!'),
|
||||||
|
backgroundColor: AppColor.success,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: AppColor.background,
|
||||||
|
appBar: AppBar(
|
||||||
|
title: const Text(
|
||||||
|
'Daily Tasks',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColor.textWhite,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
backgroundColor: AppColor.primary,
|
||||||
|
elevation: 0,
|
||||||
|
bottom: TabBar(
|
||||||
|
controller: _tabController,
|
||||||
|
indicatorColor: AppColor.textWhite,
|
||||||
|
labelColor: AppColor.textWhite,
|
||||||
|
unselectedLabelColor: AppColor.textWhite.withOpacity(0.7),
|
||||||
|
labelStyle: const TextStyle(fontWeight: FontWeight.bold),
|
||||||
|
tabs: taskSections
|
||||||
|
.map((section) => Tab(text: section.title))
|
||||||
|
.toList(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: TabBarView(
|
||||||
|
controller: _tabController,
|
||||||
|
children: taskSections.map((section) {
|
||||||
|
return SingleChildScrollView(
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
_buildSectionHeader(section.title),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
...section.questions.map((question) {
|
||||||
|
return _buildQuestionCard(question);
|
||||||
|
}).toList(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
_buildSubmitButton(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildSectionHeader(String title) {
|
||||||
|
return Container(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [AppColor.primary, AppColor.primaryLight],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
title == "OPENING" ? Icons.wb_sunny : Icons.nightlight_round,
|
||||||
|
color: AppColor.textWhite,
|
||||||
|
size: 24,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 12),
|
||||||
|
Text(
|
||||||
|
'$title CHECKLIST',
|
||||||
|
style: const TextStyle(
|
||||||
|
color: AppColor.textWhite,
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildQuestionCard(TaskQuestion question) {
|
||||||
|
return Container(
|
||||||
|
margin: const EdgeInsets.only(bottom: 16),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColor.white,
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: AppColor.black.withOpacity(0.05),
|
||||||
|
blurRadius: 8,
|
||||||
|
offset: const Offset(0, 2),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
question.question,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: AppColor.textPrimary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
|
||||||
|
// Yes/No buttons
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: _buildAnswerButton(
|
||||||
|
question: question,
|
||||||
|
value: true,
|
||||||
|
label: "YES",
|
||||||
|
icon: Icons.check_circle,
|
||||||
|
color: AppColor.success,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 12),
|
||||||
|
Expanded(
|
||||||
|
child: _buildAnswerButton(
|
||||||
|
question: question,
|
||||||
|
value: false,
|
||||||
|
label: "NO",
|
||||||
|
icon: Icons.cancel,
|
||||||
|
color: AppColor.error,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
|
||||||
|
// Photo section
|
||||||
|
_buildPhotoSection(question),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildAnswerButton({
|
||||||
|
required TaskQuestion question,
|
||||||
|
required bool value,
|
||||||
|
required String label,
|
||||||
|
required IconData icon,
|
||||||
|
required Color color,
|
||||||
|
}) {
|
||||||
|
bool isSelected = question.answer == value;
|
||||||
|
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
question.answer = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: isSelected ? color : AppColor.backgroundLight,
|
||||||
|
border: Border.all(
|
||||||
|
color: isSelected ? color : AppColor.border,
|
||||||
|
width: 1.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
icon,
|
||||||
|
color: isSelected ? AppColor.white : AppColor.textSecondary,
|
||||||
|
size: 20,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Text(
|
||||||
|
label,
|
||||||
|
style: TextStyle(
|
||||||
|
color: isSelected ? AppColor.white : AppColor.textSecondary,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildPhotoSection(TaskQuestion question) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
const Icon(
|
||||||
|
Icons.camera_alt,
|
||||||
|
color: AppColor.textSecondary,
|
||||||
|
size: 18,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
const Text(
|
||||||
|
'Foto Bukti',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
color: AppColor.textSecondary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Text(' *', style: TextStyle(color: AppColor.error)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
|
||||||
|
if (question.photo == null)
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () => _pickImage(question),
|
||||||
|
child: Container(
|
||||||
|
height: 120,
|
||||||
|
width: double.infinity,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColor.borderLight,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border: Border.all(
|
||||||
|
color: AppColor.border,
|
||||||
|
style: BorderStyle.solid,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: const Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Icon(Icons.add_a_photo, size: 32, color: AppColor.textLight),
|
||||||
|
SizedBox(height: 8),
|
||||||
|
Text(
|
||||||
|
'Tap untuk mengambil foto',
|
||||||
|
style: TextStyle(color: AppColor.textLight, fontSize: 14),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
else
|
||||||
|
Stack(
|
||||||
|
children: [
|
||||||
|
ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
child: Image.file(
|
||||||
|
question.photo!,
|
||||||
|
height: 200,
|
||||||
|
width: double.infinity,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: 8,
|
||||||
|
right: 8,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () => _removePhoto(question),
|
||||||
|
child: Container(
|
||||||
|
padding: const EdgeInsets.all(4),
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
color: AppColor.error,
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
),
|
||||||
|
child: const Icon(
|
||||||
|
Icons.close,
|
||||||
|
color: AppColor.white,
|
||||||
|
size: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildSubmitButton() {
|
||||||
|
return Container(
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
color: AppColor.white,
|
||||||
|
border: Border(top: BorderSide(color: AppColor.border, width: 1)),
|
||||||
|
),
|
||||||
|
child: SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: ElevatedButton(
|
||||||
|
onPressed: _submitForm,
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: AppColor.primary,
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
elevation: 2,
|
||||||
|
),
|
||||||
|
child: const Text(
|
||||||
|
'SUBMIT DAILY TASKS',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColor.textWhite,
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,7 +1,9 @@
|
|||||||
|
import 'package:auto_route/auto_route.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:line_icons/line_icons.dart';
|
import 'package:line_icons/line_icons.dart';
|
||||||
|
|
||||||
import '../../../../common/theme/theme.dart';
|
import '../../../../common/theme/theme.dart';
|
||||||
|
import '../../../router/app_router.gr.dart';
|
||||||
import 'feature_tile.dart';
|
import 'feature_tile.dart';
|
||||||
|
|
||||||
class HomeFeature extends StatelessWidget {
|
class HomeFeature extends StatelessWidget {
|
||||||
@ -52,7 +54,7 @@ class HomeFeature extends StatelessWidget {
|
|||||||
onTap: () {},
|
onTap: () {},
|
||||||
),
|
),
|
||||||
HomeFeatureTile(
|
HomeFeatureTile(
|
||||||
title: 'Product',
|
title: 'Produk',
|
||||||
color: const Color(0xFFFF9800),
|
color: const Color(0xFFFF9800),
|
||||||
icon: LineIcons.box,
|
icon: LineIcons.box,
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
@ -64,15 +66,15 @@ class HomeFeature extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
HomeFeatureTile(
|
HomeFeatureTile(
|
||||||
title: 'Laporan',
|
title: 'Form',
|
||||||
color: const Color(0xFFE91E63),
|
color: const Color(0xFFE91E63),
|
||||||
icon: LineIcons.pieChart,
|
icon: LineIcons.fileAlt,
|
||||||
onTap: () {},
|
onTap: () => context.router.push(DailyTasksFormRoute()),
|
||||||
),
|
),
|
||||||
HomeFeatureTile(
|
HomeFeatureTile(
|
||||||
title: 'Kas & Bank',
|
title: 'Jadwal',
|
||||||
color: const Color(0xFF9C27B0),
|
color: const Color(0xFF9C27B0),
|
||||||
icon: LineIcons.university,
|
icon: LineIcons.calendar,
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
),
|
),
|
||||||
HomeFeatureTile(
|
HomeFeatureTile(
|
||||||
|
|||||||
@ -24,5 +24,8 @@ class AppRouter extends RootStackRouter {
|
|||||||
|
|
||||||
// Language
|
// Language
|
||||||
AutoRoute(page: LanguageRoute.page),
|
AutoRoute(page: LanguageRoute.page),
|
||||||
|
|
||||||
|
// Form
|
||||||
|
AutoRoute(page: DailyTasksFormRoute.page),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,148 +9,166 @@
|
|||||||
// coverage:ignore-file
|
// coverage:ignore-file
|
||||||
|
|
||||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||||
import 'package:apskel_owner_flutter/presentation/pages/auth/login/login_page.dart'
|
import 'package:apskel_owner_flutter/presentation/components/form/form_page.dart'
|
||||||
as _i3;
|
|
||||||
import 'package:apskel_owner_flutter/presentation/pages/home/home_page.dart'
|
|
||||||
as _i1;
|
as _i1;
|
||||||
import 'package:apskel_owner_flutter/presentation/pages/language/language_page.dart'
|
import 'package:apskel_owner_flutter/presentation/pages/auth/login/login_page.dart'
|
||||||
as _i2;
|
|
||||||
import 'package:apskel_owner_flutter/presentation/pages/main/main_page.dart'
|
|
||||||
as _i4;
|
as _i4;
|
||||||
import 'package:apskel_owner_flutter/presentation/pages/profile/profile_page.dart'
|
import 'package:apskel_owner_flutter/presentation/pages/home/home_page.dart'
|
||||||
|
as _i2;
|
||||||
|
import 'package:apskel_owner_flutter/presentation/pages/language/language_page.dart'
|
||||||
|
as _i3;
|
||||||
|
import 'package:apskel_owner_flutter/presentation/pages/main/main_page.dart'
|
||||||
as _i5;
|
as _i5;
|
||||||
import 'package:apskel_owner_flutter/presentation/pages/report/report_page.dart'
|
import 'package:apskel_owner_flutter/presentation/pages/profile/profile_page.dart'
|
||||||
as _i6;
|
as _i6;
|
||||||
import 'package:apskel_owner_flutter/presentation/pages/splash/splash_page.dart'
|
import 'package:apskel_owner_flutter/presentation/pages/report/report_page.dart'
|
||||||
as _i7;
|
as _i7;
|
||||||
import 'package:apskel_owner_flutter/presentation/pages/transaction/transaction_page.dart'
|
import 'package:apskel_owner_flutter/presentation/pages/splash/splash_page.dart'
|
||||||
as _i8;
|
as _i8;
|
||||||
import 'package:auto_route/auto_route.dart' as _i9;
|
import 'package:apskel_owner_flutter/presentation/pages/transaction/transaction_page.dart'
|
||||||
|
as _i9;
|
||||||
|
import 'package:auto_route/auto_route.dart' as _i10;
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i1.HomePage]
|
/// [_i1.DailyTasksFormPage]
|
||||||
class HomeRoute extends _i9.PageRouteInfo<void> {
|
class DailyTasksFormRoute extends _i10.PageRouteInfo<void> {
|
||||||
const HomeRoute({List<_i9.PageRouteInfo>? children})
|
const DailyTasksFormRoute({List<_i10.PageRouteInfo>? children})
|
||||||
|
: super(DailyTasksFormRoute.name, initialChildren: children);
|
||||||
|
|
||||||
|
static const String name = 'DailyTasksFormRoute';
|
||||||
|
|
||||||
|
static _i10.PageInfo page = _i10.PageInfo(
|
||||||
|
name,
|
||||||
|
builder: (data) {
|
||||||
|
return const _i1.DailyTasksFormPage();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// generated route for
|
||||||
|
/// [_i2.HomePage]
|
||||||
|
class HomeRoute extends _i10.PageRouteInfo<void> {
|
||||||
|
const HomeRoute({List<_i10.PageRouteInfo>? children})
|
||||||
: super(HomeRoute.name, initialChildren: children);
|
: super(HomeRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'HomeRoute';
|
static const String name = 'HomeRoute';
|
||||||
|
|
||||||
static _i9.PageInfo page = _i9.PageInfo(
|
static _i10.PageInfo page = _i10.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i1.HomePage();
|
return const _i2.HomePage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i2.LanguagePage]
|
/// [_i3.LanguagePage]
|
||||||
class LanguageRoute extends _i9.PageRouteInfo<void> {
|
class LanguageRoute extends _i10.PageRouteInfo<void> {
|
||||||
const LanguageRoute({List<_i9.PageRouteInfo>? children})
|
const LanguageRoute({List<_i10.PageRouteInfo>? children})
|
||||||
: super(LanguageRoute.name, initialChildren: children);
|
: super(LanguageRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'LanguageRoute';
|
static const String name = 'LanguageRoute';
|
||||||
|
|
||||||
static _i9.PageInfo page = _i9.PageInfo(
|
static _i10.PageInfo page = _i10.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i2.LanguagePage();
|
return const _i3.LanguagePage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i3.LoginPage]
|
/// [_i4.LoginPage]
|
||||||
class LoginRoute extends _i9.PageRouteInfo<void> {
|
class LoginRoute extends _i10.PageRouteInfo<void> {
|
||||||
const LoginRoute({List<_i9.PageRouteInfo>? children})
|
const LoginRoute({List<_i10.PageRouteInfo>? children})
|
||||||
: super(LoginRoute.name, initialChildren: children);
|
: super(LoginRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'LoginRoute';
|
static const String name = 'LoginRoute';
|
||||||
|
|
||||||
static _i9.PageInfo page = _i9.PageInfo(
|
static _i10.PageInfo page = _i10.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i3.LoginPage();
|
return const _i4.LoginPage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i4.MainPage]
|
/// [_i5.MainPage]
|
||||||
class MainRoute extends _i9.PageRouteInfo<void> {
|
class MainRoute extends _i10.PageRouteInfo<void> {
|
||||||
const MainRoute({List<_i9.PageRouteInfo>? children})
|
const MainRoute({List<_i10.PageRouteInfo>? children})
|
||||||
: super(MainRoute.name, initialChildren: children);
|
: super(MainRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'MainRoute';
|
static const String name = 'MainRoute';
|
||||||
|
|
||||||
static _i9.PageInfo page = _i9.PageInfo(
|
static _i10.PageInfo page = _i10.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i4.MainPage();
|
return const _i5.MainPage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i5.ProfilePage]
|
/// [_i6.ProfilePage]
|
||||||
class ProfileRoute extends _i9.PageRouteInfo<void> {
|
class ProfileRoute extends _i10.PageRouteInfo<void> {
|
||||||
const ProfileRoute({List<_i9.PageRouteInfo>? children})
|
const ProfileRoute({List<_i10.PageRouteInfo>? children})
|
||||||
: super(ProfileRoute.name, initialChildren: children);
|
: super(ProfileRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'ProfileRoute';
|
static const String name = 'ProfileRoute';
|
||||||
|
|
||||||
static _i9.PageInfo page = _i9.PageInfo(
|
static _i10.PageInfo page = _i10.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i5.ProfilePage();
|
return const _i6.ProfilePage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i6.ReportPage]
|
/// [_i7.ReportPage]
|
||||||
class ReportRoute extends _i9.PageRouteInfo<void> {
|
class ReportRoute extends _i10.PageRouteInfo<void> {
|
||||||
const ReportRoute({List<_i9.PageRouteInfo>? children})
|
const ReportRoute({List<_i10.PageRouteInfo>? children})
|
||||||
: super(ReportRoute.name, initialChildren: children);
|
: super(ReportRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'ReportRoute';
|
static const String name = 'ReportRoute';
|
||||||
|
|
||||||
static _i9.PageInfo page = _i9.PageInfo(
|
static _i10.PageInfo page = _i10.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i6.ReportPage();
|
return const _i7.ReportPage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i7.SplashPage]
|
/// [_i8.SplashPage]
|
||||||
class SplashRoute extends _i9.PageRouteInfo<void> {
|
class SplashRoute extends _i10.PageRouteInfo<void> {
|
||||||
const SplashRoute({List<_i9.PageRouteInfo>? children})
|
const SplashRoute({List<_i10.PageRouteInfo>? children})
|
||||||
: super(SplashRoute.name, initialChildren: children);
|
: super(SplashRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'SplashRoute';
|
static const String name = 'SplashRoute';
|
||||||
|
|
||||||
static _i9.PageInfo page = _i9.PageInfo(
|
static _i10.PageInfo page = _i10.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i7.SplashPage();
|
return const _i8.SplashPage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i8.TransactionPage]
|
/// [_i9.TransactionPage]
|
||||||
class TransactionRoute extends _i9.PageRouteInfo<void> {
|
class TransactionRoute extends _i10.PageRouteInfo<void> {
|
||||||
const TransactionRoute({List<_i9.PageRouteInfo>? children})
|
const TransactionRoute({List<_i10.PageRouteInfo>? children})
|
||||||
: super(TransactionRoute.name, initialChildren: children);
|
: super(TransactionRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'TransactionRoute';
|
static const String name = 'TransactionRoute';
|
||||||
|
|
||||||
static _i9.PageInfo page = _i9.PageInfo(
|
static _i10.PageInfo page = _i10.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i8.TransactionPage();
|
return const _i9.TransactionPage();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,10 @@
|
|||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
|
#include <file_selector_linux/file_selector_plugin.h>
|
||||||
|
|
||||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||||
|
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
|
||||||
|
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
|
||||||
|
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
|
file_selector_linux
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||||
|
|||||||
@ -6,11 +6,13 @@ import FlutterMacOS
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
import connectivity_plus
|
import connectivity_plus
|
||||||
|
import file_selector_macos
|
||||||
import path_provider_foundation
|
import path_provider_foundation
|
||||||
import shared_preferences_foundation
|
import shared_preferences_foundation
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
|
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
|
||||||
|
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
|
||||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||||
}
|
}
|
||||||
|
|||||||
112
pubspec.lock
112
pubspec.lock
@ -241,6 +241,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.2"
|
version: "3.1.2"
|
||||||
|
cross_file:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: cross_file
|
||||||
|
sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.3.4+2"
|
||||||
crypto:
|
crypto:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -345,6 +353,38 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "7.0.1"
|
version: "7.0.1"
|
||||||
|
file_selector_linux:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_linux
|
||||||
|
sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.9.3+2"
|
||||||
|
file_selector_macos:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_macos
|
||||||
|
sha256: "8c9250b2bd2d8d4268e39c82543bacbaca0fda7d29e0728c3c4bbb7c820fd711"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.9.4+3"
|
||||||
|
file_selector_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_platform_interface
|
||||||
|
sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.6.2"
|
||||||
|
file_selector_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_selector_windows
|
||||||
|
sha256: "320fcfb6f33caa90f0b58380489fc5ac05d99ee94b61aa96ec2bff0ba81d3c2b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.9.3+4"
|
||||||
fixnum:
|
fixnum:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -411,6 +451,14 @@ packages:
|
|||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
|
flutter_plugin_android_lifecycle:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: flutter_plugin_android_lifecycle
|
||||||
|
sha256: "6382ce712ff69b0f719640ce957559dde459e55ecd433c767e06d139ddf16cab"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.29"
|
||||||
flutter_spinkit:
|
flutter_spinkit:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -525,6 +573,70 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.5.4"
|
version: "4.5.4"
|
||||||
|
image_picker:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: image_picker
|
||||||
|
sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.2"
|
||||||
|
image_picker_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_android
|
||||||
|
sha256: b08e9a04d0f8d91f4a6e767a745b9871bfbc585410205c311d0492de20a7ccd6
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.8.12+25"
|
||||||
|
image_picker_for_web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_for_web
|
||||||
|
sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.6"
|
||||||
|
image_picker_ios:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_ios
|
||||||
|
sha256: "05da758e67bc7839e886b3959848aa6b44ff123ab4b28f67891008afe8ef9100"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.8.12+2"
|
||||||
|
image_picker_linux:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_linux
|
||||||
|
sha256: "34a65f6740df08bbbeb0a1abd8e6d32107941fd4868f67a507b25601651022c9"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.1+2"
|
||||||
|
image_picker_macos:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_macos
|
||||||
|
sha256: "1b90ebbd9dcf98fb6c1d01427e49a55bd96b5d67b8c67cf955d60a5de74207c1"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.1+2"
|
||||||
|
image_picker_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_platform_interface
|
||||||
|
sha256: "886d57f0be73c4b140004e78b9f28a8914a09e50c2d816bdd0520051a71236a0"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.10.1"
|
||||||
|
image_picker_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: image_picker_windows
|
||||||
|
sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.2.1+1"
|
||||||
image_size_getter:
|
image_size_getter:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|||||||
@ -36,6 +36,7 @@ dependencies:
|
|||||||
fl_chart: ^1.0.0
|
fl_chart: ^1.0.0
|
||||||
another_flushbar: ^1.12.30
|
another_flushbar: ^1.12.30
|
||||||
flutter_bloc: ^9.1.1
|
flutter_bloc: ^9.1.1
|
||||||
|
image_picker: ^1.1.2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
@ -7,8 +7,11 @@
|
|||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
|
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
|
||||||
|
#include <file_selector_windows/file_selector_windows.h>
|
||||||
|
|
||||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
|
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
|
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
|
||||||
|
FileSelectorWindowsRegisterWithRegistrar(
|
||||||
|
registry->GetRegistrarForPlugin("FileSelectorWindows"));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
connectivity_plus
|
connectivity_plus
|
||||||
|
file_selector_windows
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user