feat: exclusive summary
Build & Deploy iOS to TestFlight / build-and-deploy (push) Has been cancelled
Build & Deploy iOS to TestFlight / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,890 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:line_icons/line_icons.dart';
|
||||
import 'package:shimmer/shimmer.dart';
|
||||
|
||||
import '../../../application/analytic/exclusive_summary_loader/exclusive_summary_loader_bloc.dart';
|
||||
import '../../../common/extension/extension.dart';
|
||||
import '../../../common/theme/theme.dart';
|
||||
import '../../../domain/analytic/analytic.dart';
|
||||
import '../../../injection.dart';
|
||||
import '../../components/appbar/appbar.dart';
|
||||
import '../../components/field/date_range_picker_field.dart';
|
||||
import '../../components/spacer/spacer.dart';
|
||||
|
||||
@RoutePage()
|
||||
class ExclusiveSummaryPage extends StatefulWidget
|
||||
implements AutoRouteWrapper {
|
||||
const ExclusiveSummaryPage({super.key});
|
||||
|
||||
@override
|
||||
State<ExclusiveSummaryPage> createState() => _ExclusiveSummaryPageState();
|
||||
|
||||
@override
|
||||
Widget wrappedRoute(BuildContext context) => BlocProvider(
|
||||
create: (context) => getIt<ExclusiveSummaryLoaderBloc>()
|
||||
..add(ExclusiveSummaryLoaderEvent.fetched()),
|
||||
child: this,
|
||||
);
|
||||
}
|
||||
|
||||
class _ExclusiveSummaryPageState extends State<ExclusiveSummaryPage>
|
||||
with TickerProviderStateMixin {
|
||||
late AnimationController _fadeController;
|
||||
late AnimationController _slideController;
|
||||
late Animation<double> _fadeAnimation;
|
||||
late Animation<Offset> _slideAnimation;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
_fadeController = AnimationController(
|
||||
duration: const Duration(milliseconds: 800),
|
||||
vsync: this,
|
||||
);
|
||||
_slideController = AnimationController(
|
||||
duration: const Duration(milliseconds: 900),
|
||||
vsync: this,
|
||||
);
|
||||
|
||||
_fadeAnimation = Tween<double>(begin: 0.0, end: 1.0).animate(
|
||||
CurvedAnimation(parent: _fadeController, curve: Curves.easeOut),
|
||||
);
|
||||
_slideAnimation =
|
||||
Tween<Offset>(begin: const Offset(0, 0.3), end: Offset.zero).animate(
|
||||
CurvedAnimation(parent: _slideController, curve: Curves.easeOutCubic),
|
||||
);
|
||||
|
||||
_fadeController.forward();
|
||||
_slideController.forward();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_fadeController.dispose();
|
||||
_slideController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColor.background,
|
||||
body: BlocListener<ExclusiveSummaryLoaderBloc,
|
||||
ExclusiveSummaryLoaderState>(
|
||||
listenWhen: (prev, curr) =>
|
||||
prev.dateFrom != curr.dateFrom || prev.dateTo != curr.dateTo,
|
||||
listener: (context, state) {
|
||||
context
|
||||
.read<ExclusiveSummaryLoaderBloc>()
|
||||
.add(ExclusiveSummaryLoaderEvent.fetched());
|
||||
},
|
||||
child: BlocBuilder<ExclusiveSummaryLoaderBloc,
|
||||
ExclusiveSummaryLoaderState>(
|
||||
builder: (context, state) {
|
||||
return RefreshIndicator(
|
||||
color: AppColor.primary,
|
||||
onRefresh: () async {
|
||||
context
|
||||
.read<ExclusiveSummaryLoaderBloc>()
|
||||
.add(ExclusiveSummaryLoaderEvent.fetched());
|
||||
await context
|
||||
.read<ExclusiveSummaryLoaderBloc>()
|
||||
.stream
|
||||
.firstWhere((s) => !s.isFetching);
|
||||
},
|
||||
child: CustomScrollView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
slivers: [
|
||||
// App Bar
|
||||
SliverAppBar(
|
||||
expandedHeight: 120,
|
||||
floating: false,
|
||||
pinned: true,
|
||||
backgroundColor: AppColor.primary,
|
||||
flexibleSpace: CustomAppBar(
|
||||
title: context.lang.exclusive_summary,
|
||||
),
|
||||
),
|
||||
|
||||
// Date Range Picker
|
||||
SliverToBoxAdapter(
|
||||
child: FadeTransition(
|
||||
opacity: _fadeAnimation,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: DateRangePickerField(
|
||||
maxDate: DateTime.now(),
|
||||
startDate: state.dateFrom,
|
||||
endDate: state.dateTo,
|
||||
onChanged: (startDate, endDate) {
|
||||
context.read<ExclusiveSummaryLoaderBloc>().add(
|
||||
ExclusiveSummaryLoaderEvent.rangeDateChanged(
|
||||
startDate!,
|
||||
endDate!,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Content
|
||||
SliverToBoxAdapter(
|
||||
child: SlideTransition(
|
||||
position: _slideAnimation,
|
||||
child: FadeTransition(
|
||||
opacity: _fadeAnimation,
|
||||
child: state.isFetching
|
||||
? _buildShimmer()
|
||||
: _buildContent(state.exclusiveSummary),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
const SliverToBoxAdapter(child: SpaceHeight(80)),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// ─── SHIMMER ────────────────────────────────────────────────────────────────
|
||||
|
||||
Widget _buildShimmer() {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
children: [
|
||||
_shimmerBox(height: 160),
|
||||
const SpaceHeight(16),
|
||||
Row(children: [
|
||||
Expanded(child: _shimmerBox(height: 100)),
|
||||
const SpaceWidth(12),
|
||||
Expanded(child: _shimmerBox(height: 100)),
|
||||
]),
|
||||
const SpaceHeight(16),
|
||||
_shimmerBox(height: 200),
|
||||
const SpaceHeight(16),
|
||||
_shimmerBox(height: 150),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _shimmerBox({required double height}) {
|
||||
return Shimmer.fromColors(
|
||||
baseColor: Colors.grey[300]!,
|
||||
highlightColor: Colors.grey[100]!,
|
||||
child: Container(
|
||||
height: height,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// ─── CONTENT ────────────────────────────────────────────────────────────────
|
||||
|
||||
Widget _buildContent(ExclusiveSummary data) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_buildNetProfitCard(data.summary),
|
||||
const SpaceHeight(16),
|
||||
_buildSummaryGrid(data.summary),
|
||||
const SpaceHeight(16),
|
||||
_buildReimburseCard(data.reimburse),
|
||||
const SpaceHeight(16),
|
||||
if (data.hppBreakdown.isNotEmpty) ...[
|
||||
_buildBreakdownSection(
|
||||
title: context.lang.hpp_breakdown,
|
||||
icon: LineIcons.shoppingBag,
|
||||
color: AppColor.error,
|
||||
items: data.hppBreakdown,
|
||||
),
|
||||
const SpaceHeight(16),
|
||||
],
|
||||
if (data.operationalExpenseBreakdown.isNotEmpty) ...[
|
||||
_buildBreakdownSection(
|
||||
title: context.lang.operational_expense_breakdown,
|
||||
icon: LineIcons.receipt,
|
||||
color: AppColor.warning,
|
||||
items: data.operationalExpenseBreakdown,
|
||||
),
|
||||
const SpaceHeight(16),
|
||||
],
|
||||
if (data.dailySummary.isNotEmpty) ...[
|
||||
_buildDailySummarySection(data.dailySummary),
|
||||
const SpaceHeight(16),
|
||||
],
|
||||
if (data.dailyTransactions.isNotEmpty) ...[
|
||||
_buildTransactionsSection(data.dailyTransactions),
|
||||
const SpaceHeight(16),
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// ─── NET PROFIT HERO CARD ───────────────────────────────────────────────────
|
||||
|
||||
Widget _buildNetProfitCard(ExclusiveSummarySummary summary) {
|
||||
final isPositive = summary.netProfit >= 0;
|
||||
final gradientColors = isPositive
|
||||
? AppColor.successGradient
|
||||
: [AppColor.error, AppColor.error.withOpacity(0.7)];
|
||||
|
||||
return TweenAnimationBuilder<double>(
|
||||
tween: Tween(begin: 0.0, end: 1.0),
|
||||
duration: const Duration(milliseconds: 900),
|
||||
curve: Curves.elasticOut,
|
||||
builder: (context, value, _) => Transform.scale(
|
||||
scale: value.clamp(0.0, 1.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(24),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: gradientColors,
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: (isPositive ? AppColor.success : AppColor.error)
|
||||
.withOpacity(0.3),
|
||||
blurRadius: 20,
|
||||
offset: const Offset(0, 8),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.2),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Icon(
|
||||
isPositive ? LineIcons.lineChart : LineIcons.arrowDown,
|
||||
color: Colors.white,
|
||||
size: 22,
|
||||
),
|
||||
),
|
||||
const SpaceWidth(12),
|
||||
Text(
|
||||
context.lang.net_profit,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SpaceHeight(16),
|
||||
Text(
|
||||
summary.netProfit.currencyFormatRp,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 32,
|
||||
fontWeight: FontWeight.bold,
|
||||
letterSpacing: -0.5,
|
||||
),
|
||||
),
|
||||
const SpaceHeight(8),
|
||||
Row(
|
||||
children: [
|
||||
_buildHeroStat(
|
||||
context.lang.total_sales,
|
||||
summary.sales.currencyFormatRp,
|
||||
),
|
||||
const SpaceWidth(24),
|
||||
_buildHeroStat(
|
||||
context.lang.total_cost,
|
||||
summary.totalCost.currencyFormatRp,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildHeroStat(String label, String value) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.8),
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
value,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// ─── SUMMARY GRID ───────────────────────────────────────────────────────────
|
||||
|
||||
Widget _buildSummaryGrid(ExclusiveSummarySummary summary) {
|
||||
return Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: _buildStatCard(
|
||||
icon: LineIcons.arrowUp,
|
||||
label: context.lang.gross_profit,
|
||||
value: summary.grossProfit.currencyFormatRp,
|
||||
color: AppColor.success,
|
||||
),
|
||||
),
|
||||
const SpaceWidth(12),
|
||||
Expanded(
|
||||
child: _buildStatCard(
|
||||
icon: LineIcons.shoppingBag,
|
||||
label: context.lang.hpp,
|
||||
value: summary.hpp.currencyFormatRp,
|
||||
color: AppColor.error,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SpaceHeight(12),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: _buildStatCard(
|
||||
icon: LineIcons.users,
|
||||
label: context.lang.salary_total,
|
||||
value: summary.salaryTotal.currencyFormatRp,
|
||||
color: AppColor.info,
|
||||
),
|
||||
),
|
||||
const SpaceWidth(12),
|
||||
Expanded(
|
||||
child: _buildStatCard(
|
||||
icon: LineIcons.receipt,
|
||||
label: context.lang.operational_expenses,
|
||||
value: summary.operationalExpensesTotal.currencyFormatRp,
|
||||
color: AppColor.warning,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildStatCard({
|
||||
required IconData icon,
|
||||
required String label,
|
||||
required String value,
|
||||
required Color color,
|
||||
}) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: color.withOpacity(0.08),
|
||||
blurRadius: 12,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
],
|
||||
border: Border.all(color: color.withOpacity(0.12)),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: color.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Icon(icon, color: color, size: 18),
|
||||
),
|
||||
const SpaceHeight(10),
|
||||
Text(
|
||||
label,
|
||||
style: AppStyle.sm.copyWith(color: AppColor.textSecondary),
|
||||
),
|
||||
const SpaceHeight(4),
|
||||
Text(
|
||||
value,
|
||||
style: AppStyle.md.copyWith(
|
||||
color: AppColor.textPrimary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// ─── REIMBURSE CARD ─────────────────────────────────────────────────────────
|
||||
|
||||
Widget _buildReimburseCard(ExclusiveSummaryReimburse reimburse) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColor.primary.withOpacity(0.08),
|
||||
blurRadius: 12,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.primary.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: const Icon(
|
||||
LineIcons.moneyBill,
|
||||
color: AppColor.primary,
|
||||
size: 18,
|
||||
),
|
||||
),
|
||||
const SpaceWidth(10),
|
||||
Text(
|
||||
context.lang.reimburse_summary,
|
||||
style: AppStyle.lg.copyWith(fontWeight: FontWeight.bold),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SpaceHeight(16),
|
||||
_buildReimburseRow(
|
||||
context.lang.total_cost,
|
||||
reimburse.totalCost.currencyFormatRp,
|
||||
),
|
||||
const Divider(height: 20),
|
||||
_buildReimburseRow(
|
||||
context.lang.excluded_salary_staff,
|
||||
reimburse.excludedSalaryStaff.currencyFormatRp,
|
||||
),
|
||||
const Divider(height: 20),
|
||||
_buildReimburseRow(
|
||||
context.lang.total_reimburse,
|
||||
reimburse.totalReimburse.currencyFormatRp,
|
||||
isHighlighted: true,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildReimburseRow(
|
||||
String label,
|
||||
String value, {
|
||||
bool isHighlighted = false,
|
||||
}) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: AppStyle.sm.copyWith(
|
||||
color: isHighlighted
|
||||
? AppColor.textPrimary
|
||||
: AppColor.textSecondary,
|
||||
fontWeight:
|
||||
isHighlighted ? FontWeight.bold : FontWeight.normal,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
value,
|
||||
style: AppStyle.sm.copyWith(
|
||||
color: isHighlighted ? AppColor.primary : AppColor.textPrimary,
|
||||
fontWeight:
|
||||
isHighlighted ? FontWeight.bold : FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
// ─── BREAKDOWN SECTION ──────────────────────────────────────────────────────
|
||||
|
||||
Widget _buildBreakdownSection({
|
||||
required String title,
|
||||
required IconData icon,
|
||||
required Color color,
|
||||
required List<ExclusiveSummaryBreakdown> items,
|
||||
}) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.04),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: color.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Icon(icon, color: color, size: 18),
|
||||
),
|
||||
const SpaceWidth(10),
|
||||
Expanded(
|
||||
child: Text(
|
||||
title,
|
||||
style: AppStyle.lg.copyWith(fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SpaceHeight(16),
|
||||
...items.map((item) => _buildBreakdownItem(item, color)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildBreakdownItem(
|
||||
ExclusiveSummaryBreakdown item,
|
||||
Color color,
|
||||
) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
item.categoryName,
|
||||
style: AppStyle.sm.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColor.textPrimary,
|
||||
),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
item.amount.currencyFormatRp,
|
||||
style: AppStyle.sm.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: color,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${item.percentage.toStringAsFixed(1)}%',
|
||||
style: AppStyle.xs.copyWith(
|
||||
color: AppColor.textSecondary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
const SpaceHeight(6),
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
child: TweenAnimationBuilder<double>(
|
||||
tween: Tween(begin: 0.0, end: item.percentage / 100),
|
||||
duration: const Duration(milliseconds: 800),
|
||||
curve: Curves.easeOutCubic,
|
||||
builder: (context, value, _) => LinearProgressIndicator(
|
||||
value: value.clamp(0.0, 1.0),
|
||||
backgroundColor: color.withOpacity(0.1),
|
||||
valueColor: AlwaysStoppedAnimation<Color>(color),
|
||||
minHeight: 6,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// ─── DAILY SUMMARY ──────────────────────────────────────────────────────────
|
||||
|
||||
Widget _buildDailySummarySection(List<ExclusiveSummaryDaily> items) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.04),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.info.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: const Icon(
|
||||
LineIcons.calendar,
|
||||
color: AppColor.info,
|
||||
size: 18,
|
||||
),
|
||||
),
|
||||
const SpaceWidth(10),
|
||||
Text(
|
||||
context.lang.daily_summary,
|
||||
style: AppStyle.lg.copyWith(fontWeight: FontWeight.bold),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SpaceHeight(16),
|
||||
ListView.separated(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemCount: items.length,
|
||||
separatorBuilder: (_, __) => const Divider(height: 16),
|
||||
itemBuilder: (context, index) {
|
||||
final item = items[index];
|
||||
return Row(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.primary.withOpacity(0.08),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Text(
|
||||
'${item.date.day}',
|
||||
style: AppStyle.md.copyWith(
|
||||
color: AppColor.primary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SpaceWidth(12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
item.date.toDate,
|
||||
style: AppStyle.sm.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${item.transactionCount} ${context.lang.transactions}',
|
||||
style: AppStyle.xs.copyWith(
|
||||
color: AppColor.textSecondary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Text(
|
||||
item.totalCost.currencyFormatRp,
|
||||
style: AppStyle.sm.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColor.error,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// ─── DAILY TRANSACTIONS ─────────────────────────────────────────────────────
|
||||
|
||||
Widget _buildTransactionsSection(
|
||||
List<ExclusiveSummaryTransaction> items) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.04),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.secondary.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: const Icon(
|
||||
LineIcons.list,
|
||||
color: AppColor.secondary,
|
||||
size: 18,
|
||||
),
|
||||
),
|
||||
const SpaceWidth(10),
|
||||
Text(
|
||||
context.lang.daily_transactions,
|
||||
style: AppStyle.lg.copyWith(fontWeight: FontWeight.bold),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SpaceHeight(16),
|
||||
ListView.separated(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemCount: items.length,
|
||||
separatorBuilder: (_, __) => const Divider(height: 16),
|
||||
itemBuilder: (context, index) {
|
||||
final tx = items[index];
|
||||
return Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8,
|
||||
vertical: 4,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: _sourceColor(tx.source).withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Text(
|
||||
_sourceLabel(tx.source),
|
||||
style: AppStyle.xs.copyWith(
|
||||
color: _sourceColor(tx.source),
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SpaceWidth(10),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
tx.description,
|
||||
style: AppStyle.sm.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${tx.categoryName} · ${tx.date.toShortDate}',
|
||||
style: AppStyle.xs.copyWith(
|
||||
color: AppColor.textSecondary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Text(
|
||||
tx.amount.currencyFormatRp,
|
||||
style: AppStyle.sm.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColor.error,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Color _sourceColor(String source) {
|
||||
switch (source) {
|
||||
case 'purchase_order':
|
||||
return AppColor.info;
|
||||
case 'salary':
|
||||
return AppColor.warning;
|
||||
case 'operational':
|
||||
return AppColor.secondary;
|
||||
default:
|
||||
return AppColor.primary;
|
||||
}
|
||||
}
|
||||
|
||||
String _sourceLabel(String source) {
|
||||
switch (source) {
|
||||
case 'purchase_order':
|
||||
return 'PO';
|
||||
case 'salary':
|
||||
return 'Gaji';
|
||||
case 'operational':
|
||||
return 'Ops';
|
||||
default:
|
||||
return source;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,9 +52,9 @@ class HomeFeature extends StatelessWidget {
|
||||
onTap: () => context.router.push(FinanceRoute()),
|
||||
),
|
||||
HomeFeatureTile(
|
||||
title: context.lang.product,
|
||||
iconPath: Assets.icons.icReportProduct.path,
|
||||
onTap: () => context.router.push(ProductAnalyticRoute()),
|
||||
title: context.lang.exclusive_summary,
|
||||
iconPath: Assets.icons.icReportExclusiveSummary.path,
|
||||
onTap: () => context.router.push(ExclusiveSummaryRoute()),
|
||||
),
|
||||
// HomeFeatureTile(
|
||||
// title: context.lang.inventory,
|
||||
|
||||
@@ -50,6 +50,9 @@ class AppRouter extends RootStackRouter {
|
||||
// Finance page
|
||||
AutoRoute(page: FinanceRoute.page),
|
||||
|
||||
// Exclusive Summary
|
||||
AutoRoute(page: ExclusiveSummaryRoute.page),
|
||||
|
||||
// Order
|
||||
AutoRoute(page: OrderDetailRoute.page),
|
||||
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
// coverage:ignore-file
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'package:apskel_owner_flutter/domain/order/order.dart' as _i28;
|
||||
import 'package:apskel_owner_flutter/domain/user/user.dart' as _i29;
|
||||
import 'package:apskel_owner_flutter/domain/order/order.dart' as _i29;
|
||||
import 'package:apskel_owner_flutter/domain/user/user.dart' as _i30;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/about_app/about_app_page.dart'
|
||||
as _i1;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/auth/login/login_page.dart'
|
||||
as _i11;
|
||||
as _i12;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/coming_soon/coming_soon_page.dart'
|
||||
as _i2;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/customer/customer_page.dart'
|
||||
@@ -23,56 +23,58 @@ import 'package:apskel_owner_flutter/presentation/pages/download/download_report
|
||||
as _i5;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/error/error_page.dart'
|
||||
as _i6;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/finance/finance_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/exclusive_summary/exclusive_summary_page.dart'
|
||||
as _i7;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/finance/finance_page.dart'
|
||||
as _i8;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/form/daily_task_form_page.dart'
|
||||
as _i4;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/home/home_page.dart'
|
||||
as _i8;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/inventory/inventory_page.dart'
|
||||
as _i9;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/language/language_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/inventory/inventory_page.dart'
|
||||
as _i10;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/language/language_page.dart'
|
||||
as _i11;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/main/main_page.dart'
|
||||
as _i12;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/order/order_detail/order_detail_page.dart'
|
||||
as _i13;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/order/order_list/order_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/order/order_detail/order_detail_page.dart'
|
||||
as _i14;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/outlet/outlet_information_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/order/order_list/order_page.dart'
|
||||
as _i15;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/product/product_analytic/product_analytic_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/outlet/outlet_information_page.dart'
|
||||
as _i16;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/product/product_list/product_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/product/product_analytic/product_analytic_page.dart'
|
||||
as _i17;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/profile/pages/profile_change_password/profile_change_password_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/product/product_list/product_page.dart'
|
||||
as _i18;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/profile/pages/profile_edit/profile_edit_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/profile/pages/profile_change_password/profile_change_password_page.dart'
|
||||
as _i19;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/profile/profile_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/profile/pages/profile_edit/profile_edit_page.dart'
|
||||
as _i20;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/purchase/purchase_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/profile/profile_page.dart'
|
||||
as _i21;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/report/report_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/purchase/purchase_page.dart'
|
||||
as _i22;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/sales/sales_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/report/report_page.dart'
|
||||
as _i23;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/schedule/schedule_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/sales/sales_page.dart'
|
||||
as _i24;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/splash/splash_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/schedule/schedule_page.dart'
|
||||
as _i25;
|
||||
import 'package:auto_route/auto_route.dart' as _i26;
|
||||
import 'package:flutter/material.dart' as _i27;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/splash/splash_page.dart'
|
||||
as _i26;
|
||||
import 'package:auto_route/auto_route.dart' as _i27;
|
||||
import 'package:flutter/material.dart' as _i28;
|
||||
|
||||
/// generated route for
|
||||
/// [_i1.AboutAppPage]
|
||||
class AboutAppRoute extends _i26.PageRouteInfo<void> {
|
||||
const AboutAppRoute({List<_i26.PageRouteInfo>? children})
|
||||
class AboutAppRoute extends _i27.PageRouteInfo<void> {
|
||||
const AboutAppRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(AboutAppRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'AboutAppRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i1.AboutAppPage();
|
||||
@@ -82,13 +84,13 @@ class AboutAppRoute extends _i26.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i2.ComingSoonPage]
|
||||
class ComingSoonRoute extends _i26.PageRouteInfo<void> {
|
||||
const ComingSoonRoute({List<_i26.PageRouteInfo>? children})
|
||||
class ComingSoonRoute extends _i27.PageRouteInfo<void> {
|
||||
const ComingSoonRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(ComingSoonRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ComingSoonRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i2.ComingSoonPage();
|
||||
@@ -98,29 +100,29 @@ class ComingSoonRoute extends _i26.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i3.CustomerPage]
|
||||
class CustomerRoute extends _i26.PageRouteInfo<void> {
|
||||
const CustomerRoute({List<_i26.PageRouteInfo>? children})
|
||||
class CustomerRoute extends _i27.PageRouteInfo<void> {
|
||||
const CustomerRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(CustomerRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'CustomerRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i26.WrappedRoute(child: const _i3.CustomerPage());
|
||||
return _i27.WrappedRoute(child: const _i3.CustomerPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i4.DailyTasksFormPage]
|
||||
class DailyTasksFormRoute extends _i26.PageRouteInfo<void> {
|
||||
const DailyTasksFormRoute({List<_i26.PageRouteInfo>? children})
|
||||
class DailyTasksFormRoute extends _i27.PageRouteInfo<void> {
|
||||
const DailyTasksFormRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(DailyTasksFormRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'DailyTasksFormRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i4.DailyTasksFormPage();
|
||||
@@ -130,32 +132,32 @@ class DailyTasksFormRoute extends _i26.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i5.DownloadReportPage]
|
||||
class DownloadReportRoute extends _i26.PageRouteInfo<void> {
|
||||
const DownloadReportRoute({List<_i26.PageRouteInfo>? children})
|
||||
class DownloadReportRoute extends _i27.PageRouteInfo<void> {
|
||||
const DownloadReportRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(DownloadReportRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'DownloadReportRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i26.WrappedRoute(child: const _i5.DownloadReportPage());
|
||||
return _i27.WrappedRoute(child: const _i5.DownloadReportPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i6.ErrorPage]
|
||||
class ErrorRoute extends _i26.PageRouteInfo<ErrorRouteArgs> {
|
||||
class ErrorRoute extends _i27.PageRouteInfo<ErrorRouteArgs> {
|
||||
ErrorRoute({
|
||||
_i27.Key? key,
|
||||
_i28.Key? key,
|
||||
String? title,
|
||||
String? message,
|
||||
_i27.VoidCallback? onRetry,
|
||||
_i27.VoidCallback? onBack,
|
||||
_i28.VoidCallback? onRetry,
|
||||
_i28.VoidCallback? onBack,
|
||||
String? errorCode,
|
||||
_i27.IconData? errorIcon,
|
||||
List<_i26.PageRouteInfo>? children,
|
||||
_i28.IconData? errorIcon,
|
||||
List<_i27.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
ErrorRoute.name,
|
||||
args: ErrorRouteArgs(
|
||||
@@ -172,7 +174,7 @@ class ErrorRoute extends _i26.PageRouteInfo<ErrorRouteArgs> {
|
||||
|
||||
static const String name = 'ErrorRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<ErrorRouteArgs>(
|
||||
@@ -202,19 +204,19 @@ class ErrorRouteArgs {
|
||||
this.errorIcon,
|
||||
});
|
||||
|
||||
final _i27.Key? key;
|
||||
final _i28.Key? key;
|
||||
|
||||
final String? title;
|
||||
|
||||
final String? message;
|
||||
|
||||
final _i27.VoidCallback? onRetry;
|
||||
final _i28.VoidCallback? onRetry;
|
||||
|
||||
final _i27.VoidCallback? onBack;
|
||||
final _i28.VoidCallback? onBack;
|
||||
|
||||
final String? errorCode;
|
||||
|
||||
final _i27.IconData? errorIcon;
|
||||
final _i28.IconData? errorIcon;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@@ -223,108 +225,124 @@ class ErrorRouteArgs {
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i7.FinancePage]
|
||||
class FinanceRoute extends _i26.PageRouteInfo<void> {
|
||||
const FinanceRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i7.ExclusiveSummaryPage]
|
||||
class ExclusiveSummaryRoute extends _i27.PageRouteInfo<void> {
|
||||
const ExclusiveSummaryRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(ExclusiveSummaryRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ExclusiveSummaryRoute';
|
||||
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i27.WrappedRoute(child: const _i7.ExclusiveSummaryPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i8.FinancePage]
|
||||
class FinanceRoute extends _i27.PageRouteInfo<void> {
|
||||
const FinanceRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(FinanceRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'FinanceRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i26.WrappedRoute(child: const _i7.FinancePage());
|
||||
return _i27.WrappedRoute(child: const _i8.FinancePage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i8.HomePage]
|
||||
class HomeRoute extends _i26.PageRouteInfo<void> {
|
||||
const HomeRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i9.HomePage]
|
||||
class HomeRoute extends _i27.PageRouteInfo<void> {
|
||||
const HomeRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(HomeRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'HomeRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i26.WrappedRoute(child: const _i8.HomePage());
|
||||
return _i27.WrappedRoute(child: const _i9.HomePage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i9.InventoryPage]
|
||||
class InventoryRoute extends _i26.PageRouteInfo<void> {
|
||||
const InventoryRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i10.InventoryPage]
|
||||
class InventoryRoute extends _i27.PageRouteInfo<void> {
|
||||
const InventoryRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(InventoryRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'InventoryRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i26.WrappedRoute(child: const _i9.InventoryPage());
|
||||
return _i27.WrappedRoute(child: const _i10.InventoryPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i10.LanguagePage]
|
||||
class LanguageRoute extends _i26.PageRouteInfo<void> {
|
||||
const LanguageRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i11.LanguagePage]
|
||||
class LanguageRoute extends _i27.PageRouteInfo<void> {
|
||||
const LanguageRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(LanguageRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'LanguageRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i10.LanguagePage();
|
||||
return const _i11.LanguagePage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i11.LoginPage]
|
||||
class LoginRoute extends _i26.PageRouteInfo<void> {
|
||||
const LoginRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i12.LoginPage]
|
||||
class LoginRoute extends _i27.PageRouteInfo<void> {
|
||||
const LoginRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(LoginRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'LoginRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i26.WrappedRoute(child: const _i11.LoginPage());
|
||||
return _i27.WrappedRoute(child: const _i12.LoginPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i12.MainPage]
|
||||
class MainRoute extends _i26.PageRouteInfo<void> {
|
||||
const MainRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i13.MainPage]
|
||||
class MainRoute extends _i27.PageRouteInfo<void> {
|
||||
const MainRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(MainRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'MainRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i12.MainPage();
|
||||
return const _i13.MainPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i13.OrderDetailPage]
|
||||
class OrderDetailRoute extends _i26.PageRouteInfo<OrderDetailRouteArgs> {
|
||||
/// [_i14.OrderDetailPage]
|
||||
class OrderDetailRoute extends _i27.PageRouteInfo<OrderDetailRouteArgs> {
|
||||
OrderDetailRoute({
|
||||
_i27.Key? key,
|
||||
required _i28.Order order,
|
||||
List<_i26.PageRouteInfo>? children,
|
||||
_i28.Key? key,
|
||||
required _i29.Order order,
|
||||
List<_i27.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
OrderDetailRoute.name,
|
||||
args: OrderDetailRouteArgs(key: key, order: order),
|
||||
@@ -333,11 +351,11 @@ class OrderDetailRoute extends _i26.PageRouteInfo<OrderDetailRouteArgs> {
|
||||
|
||||
static const String name = 'OrderDetailRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<OrderDetailRouteArgs>();
|
||||
return _i13.OrderDetailPage(key: args.key, order: args.order);
|
||||
return _i14.OrderDetailPage(key: args.key, order: args.order);
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -345,9 +363,9 @@ class OrderDetailRoute extends _i26.PageRouteInfo<OrderDetailRouteArgs> {
|
||||
class OrderDetailRouteArgs {
|
||||
const OrderDetailRouteArgs({this.key, required this.order});
|
||||
|
||||
final _i27.Key? key;
|
||||
final _i28.Key? key;
|
||||
|
||||
final _i28.Order order;
|
||||
final _i29.Order order;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@@ -356,92 +374,92 @@ class OrderDetailRouteArgs {
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i14.OrderPage]
|
||||
class OrderRoute extends _i26.PageRouteInfo<void> {
|
||||
const OrderRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i15.OrderPage]
|
||||
class OrderRoute extends _i27.PageRouteInfo<void> {
|
||||
const OrderRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(OrderRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'OrderRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i26.WrappedRoute(child: const _i14.OrderPage());
|
||||
return _i27.WrappedRoute(child: const _i15.OrderPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i15.OutletInformationPage]
|
||||
class OutletInformationRoute extends _i26.PageRouteInfo<void> {
|
||||
const OutletInformationRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i16.OutletInformationPage]
|
||||
class OutletInformationRoute extends _i27.PageRouteInfo<void> {
|
||||
const OutletInformationRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(OutletInformationRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'OutletInformationRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i26.WrappedRoute(child: const _i15.OutletInformationPage());
|
||||
return _i27.WrappedRoute(child: const _i16.OutletInformationPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i16.ProductAnalyticPage]
|
||||
class ProductAnalyticRoute extends _i26.PageRouteInfo<void> {
|
||||
const ProductAnalyticRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i17.ProductAnalyticPage]
|
||||
class ProductAnalyticRoute extends _i27.PageRouteInfo<void> {
|
||||
const ProductAnalyticRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(ProductAnalyticRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ProductAnalyticRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i26.WrappedRoute(child: const _i16.ProductAnalyticPage());
|
||||
return _i27.WrappedRoute(child: const _i17.ProductAnalyticPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i17.ProductPage]
|
||||
class ProductRoute extends _i26.PageRouteInfo<void> {
|
||||
const ProductRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i18.ProductPage]
|
||||
class ProductRoute extends _i27.PageRouteInfo<void> {
|
||||
const ProductRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(ProductRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ProductRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i26.WrappedRoute(child: const _i17.ProductPage());
|
||||
return _i27.WrappedRoute(child: const _i18.ProductPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i18.ProfileChangePasswordPage]
|
||||
class ProfileChangePasswordRoute extends _i26.PageRouteInfo<void> {
|
||||
const ProfileChangePasswordRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i19.ProfileChangePasswordPage]
|
||||
class ProfileChangePasswordRoute extends _i27.PageRouteInfo<void> {
|
||||
const ProfileChangePasswordRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(ProfileChangePasswordRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ProfileChangePasswordRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i26.WrappedRoute(child: const _i18.ProfileChangePasswordPage());
|
||||
return _i27.WrappedRoute(child: const _i19.ProfileChangePasswordPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i19.ProfileEditPage]
|
||||
class ProfileEditRoute extends _i26.PageRouteInfo<ProfileEditRouteArgs> {
|
||||
/// [_i20.ProfileEditPage]
|
||||
class ProfileEditRoute extends _i27.PageRouteInfo<ProfileEditRouteArgs> {
|
||||
ProfileEditRoute({
|
||||
_i27.Key? key,
|
||||
required _i29.User user,
|
||||
List<_i26.PageRouteInfo>? children,
|
||||
_i28.Key? key,
|
||||
required _i30.User user,
|
||||
List<_i27.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
ProfileEditRoute.name,
|
||||
args: ProfileEditRouteArgs(key: key, user: user),
|
||||
@@ -450,12 +468,12 @@ class ProfileEditRoute extends _i26.PageRouteInfo<ProfileEditRouteArgs> {
|
||||
|
||||
static const String name = 'ProfileEditRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<ProfileEditRouteArgs>();
|
||||
return _i26.WrappedRoute(
|
||||
child: _i19.ProfileEditPage(key: args.key, user: args.user),
|
||||
return _i27.WrappedRoute(
|
||||
child: _i20.ProfileEditPage(key: args.key, user: args.user),
|
||||
);
|
||||
},
|
||||
);
|
||||
@@ -464,9 +482,9 @@ class ProfileEditRoute extends _i26.PageRouteInfo<ProfileEditRouteArgs> {
|
||||
class ProfileEditRouteArgs {
|
||||
const ProfileEditRouteArgs({this.key, required this.user});
|
||||
|
||||
final _i27.Key? key;
|
||||
final _i28.Key? key;
|
||||
|
||||
final _i29.User user;
|
||||
final _i30.User user;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@@ -475,97 +493,97 @@ class ProfileEditRouteArgs {
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i20.ProfilePage]
|
||||
class ProfileRoute extends _i26.PageRouteInfo<void> {
|
||||
const ProfileRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i21.ProfilePage]
|
||||
class ProfileRoute extends _i27.PageRouteInfo<void> {
|
||||
const ProfileRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(ProfileRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ProfileRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i26.WrappedRoute(child: const _i20.ProfilePage());
|
||||
return _i27.WrappedRoute(child: const _i21.ProfilePage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i21.PurchasePage]
|
||||
class PurchaseRoute extends _i26.PageRouteInfo<void> {
|
||||
const PurchaseRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i22.PurchasePage]
|
||||
class PurchaseRoute extends _i27.PageRouteInfo<void> {
|
||||
const PurchaseRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(PurchaseRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'PurchaseRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i26.WrappedRoute(child: const _i21.PurchasePage());
|
||||
return _i27.WrappedRoute(child: const _i22.PurchasePage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i22.ReportPage]
|
||||
class ReportRoute extends _i26.PageRouteInfo<void> {
|
||||
const ReportRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i23.ReportPage]
|
||||
class ReportRoute extends _i27.PageRouteInfo<void> {
|
||||
const ReportRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(ReportRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ReportRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i26.WrappedRoute(child: const _i22.ReportPage());
|
||||
return _i27.WrappedRoute(child: const _i23.ReportPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i23.SalesPage]
|
||||
class SalesRoute extends _i26.PageRouteInfo<void> {
|
||||
const SalesRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i24.SalesPage]
|
||||
class SalesRoute extends _i27.PageRouteInfo<void> {
|
||||
const SalesRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(SalesRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SalesRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i26.WrappedRoute(child: const _i23.SalesPage());
|
||||
return _i27.WrappedRoute(child: const _i24.SalesPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i24.SchedulePage]
|
||||
class ScheduleRoute extends _i26.PageRouteInfo<void> {
|
||||
const ScheduleRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i25.SchedulePage]
|
||||
class ScheduleRoute extends _i27.PageRouteInfo<void> {
|
||||
const ScheduleRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(ScheduleRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ScheduleRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i24.SchedulePage();
|
||||
return const _i25.SchedulePage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i25.SplashPage]
|
||||
class SplashRoute extends _i26.PageRouteInfo<void> {
|
||||
const SplashRoute({List<_i26.PageRouteInfo>? children})
|
||||
/// [_i26.SplashPage]
|
||||
class SplashRoute extends _i27.PageRouteInfo<void> {
|
||||
const SplashRoute({List<_i27.PageRouteInfo>? children})
|
||||
: super(SplashRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SplashRoute';
|
||||
|
||||
static _i26.PageInfo page = _i26.PageInfo(
|
||||
static _i27.PageInfo page = _i27.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i25.SplashPage();
|
||||
return const _i26.SplashPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user