From 71ebb26227af6a00d837143d9e30c56c1ad01c0b Mon Sep 17 00:00:00 2001 From: efrilm Date: Fri, 15 Aug 2025 18:28:13 +0700 Subject: [PATCH] feat: sales page --- .../pages/home/widgets/feature.dart | 2 +- lib/presentation/pages/sales/sales_page.dart | 652 ++++++++++++++++++ .../pages/sales/widgets/appbar.dart | 96 +++ .../pages/sales/widgets/summary_card.dart | 101 +++ lib/presentation/router/app_router.dart | 3 + lib/presentation/router/app_router.gr.dart | 116 ++-- 6 files changed, 920 insertions(+), 50 deletions(-) create mode 100644 lib/presentation/pages/sales/sales_page.dart create mode 100644 lib/presentation/pages/sales/widgets/appbar.dart create mode 100644 lib/presentation/pages/sales/widgets/summary_card.dart diff --git a/lib/presentation/pages/home/widgets/feature.dart b/lib/presentation/pages/home/widgets/feature.dart index d7b4f8c..c0345ae 100644 --- a/lib/presentation/pages/home/widgets/feature.dart +++ b/lib/presentation/pages/home/widgets/feature.dart @@ -39,7 +39,7 @@ class HomeFeature extends StatelessWidget { title: 'Penjualan', color: const Color(0xFF4CAF50), icon: LineIcons.receipt, - onTap: () {}, + onTap: () => context.router.push(SalesRoute()), ), HomeFeatureTile( title: 'Pembelian', diff --git a/lib/presentation/pages/sales/sales_page.dart b/lib/presentation/pages/sales/sales_page.dart new file mode 100644 index 0000000..f3188cf --- /dev/null +++ b/lib/presentation/pages/sales/sales_page.dart @@ -0,0 +1,652 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:flutter/material.dart'; + +import '../../../common/theme/theme.dart'; +import '../../components/spacer/spacer.dart'; +import 'widgets/appbar.dart'; +import 'widgets/summary_card.dart'; + +// Data Models +class SalesData { + final String dateFrom; + final String dateTo; + final SalesSummary summary; + final List dailySales; + + SalesData({ + required this.dateFrom, + required this.dateTo, + required this.summary, + required this.dailySales, + }); +} + +class SalesSummary { + final double totalSales; + final int totalOrders; + final int totalItems; + final double averageOrderValue; + final double totalTax; + final double totalDiscount; + final double netSales; + + SalesSummary({ + required this.totalSales, + required this.totalOrders, + required this.totalItems, + required this.averageOrderValue, + required this.totalTax, + required this.totalDiscount, + required this.netSales, + }); +} + +class DailySales { + final DateTime date; + final double sales; + final int orders; + final int items; + final double tax; + final double discount; + final double netSales; + + DailySales({ + required this.date, + required this.sales, + required this.orders, + required this.items, + required this.tax, + required this.discount, + required this.netSales, + }); +} + +@RoutePage() +class SalesPage extends StatefulWidget { + const SalesPage({super.key}); + + @override + State createState() => _SalesPageState(); +} + +class _SalesPageState extends State with TickerProviderStateMixin { + late AnimationController rotationAnimationController; + late Animation rotationAnimation; + + late AnimationController slideAnimationController; + late Animation slideAnimation; + + late AnimationController fadeAnimationController; + late Animation fadeAnimation; + @override + void initState() { + super.initState(); + + // Rotation Animation + rotationAnimationController = AnimationController( + duration: const Duration(seconds: 20), + vsync: this, + ); + rotationAnimation = + Tween( + begin: 0, + end: 6.28, // 2 * PI + ).animate( + CurvedAnimation( + parent: rotationAnimationController, + curve: Curves.linear, + ), + ); + rotationAnimationController.repeat(); + + // Slide Animation + slideAnimationController = AnimationController( + duration: const Duration(milliseconds: 800), + vsync: this, + ); + slideAnimation = + Tween(begin: const Offset(0, 0.3), end: Offset.zero).animate( + CurvedAnimation( + parent: slideAnimationController, + curve: Curves.easeOutCubic, + ), + ); + + // Fade Animation + fadeAnimationController = AnimationController( + duration: const Duration(milliseconds: 600), + vsync: this, + ); + fadeAnimation = Tween(begin: 0.0, end: 1.0).animate( + CurvedAnimation(parent: fadeAnimationController, curve: Curves.easeOut), + ); + + // Start animations + Future.delayed(const Duration(milliseconds: 300), () { + slideAnimationController.forward(); + fadeAnimationController.forward(); + }); + } + + @override + void dispose() { + rotationAnimationController.dispose(); + slideAnimationController.dispose(); + fadeAnimationController.dispose(); + super.dispose(); + } + + // Sample data based on your JSON + final SalesData salesData = SalesData( + dateFrom: "2025-08-01T00:00:00+07:00", + dateTo: "2025-08-15T23:59:59.999999999+07:00", + summary: SalesSummary( + totalSales: 4291000, + totalOrders: 62, + totalItems: 62, + averageOrderValue: 69209.67741935483, + totalTax: 0, + totalDiscount: 0, + netSales: 4291000, + ), + dailySales: [ + DailySales( + date: DateTime.parse("2025-08-13T00:00:00Z"), + sales: 3841000, + orders: 52, + items: 52, + tax: 0, + discount: 0, + netSales: 3841000, + ), + DailySales( + date: DateTime.parse("2025-08-14T00:00:00Z"), + sales: 450000, + orders: 10, + items: 10, + tax: 0, + discount: 0, + netSales: 450000, + ), + ], + ); + + String formatCurrency(double amount) { + return 'Rp ${amount.toStringAsFixed(0).replaceAllMapped(RegExp(r'(\d{1,3})(?=(\d{3})+(?!\d))'), (Match m) => '${m[1]}.')}'; + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: AppColor.background, + body: CustomScrollView( + slivers: [ + // App Bar + SliverAppBar( + expandedHeight: 120, + floating: false, + pinned: true, + backgroundColor: AppColor.primary, + flexibleSpace: SalesAppbar(rotationAnimation: rotationAnimation), + ), + + // Date Range Header + SliverToBoxAdapter( + child: SlideTransition( + position: slideAnimation, + child: FadeTransition( + opacity: fadeAnimation, + child: Container( + margin: const EdgeInsets.all(16), + padding: const EdgeInsets.symmetric( + horizontal: 20, + vertical: 12, + ), + decoration: BoxDecoration( + color: AppColor.surface, + borderRadius: BorderRadius.circular(12), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.05), + blurRadius: 10, + offset: const Offset(0, 2), + ), + ], + ), + child: Row( + children: [ + Icon(Icons.date_range, color: AppColor.primary, size: 20), + SpaceWidth(8), + Text( + 'Aug 1 - Aug 15, 2025', + style: AppStyle.md.copyWith( + color: AppColor.textPrimary, + fontWeight: FontWeight.w500, + ), + ), + ], + ), + ), + ), + ), + ), + + // Summary Cards + SliverToBoxAdapter( + child: SlideTransition( + position: slideAnimation, + child: FadeTransition( + opacity: fadeAnimation, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Summary', + style: AppStyle.xxl.copyWith( + fontWeight: FontWeight.bold, + color: AppColor.textPrimary, + ), + ), + const SpaceHeight(16), + TweenAnimationBuilder( + tween: Tween(begin: 0.0, end: 1.0), + duration: const Duration(milliseconds: 800), + curve: Curves.elasticOut, + builder: (context, value, child) { + return Transform.scale( + scale: value, + child: Row( + children: [ + Expanded( + child: _buildSummaryCard( + 'Total Sales', + formatCurrency( + salesData.summary.totalSales, + ), + Icons.trending_up, + AppColor.success, + 0, + ), + ), + SpaceWidth(12), + Expanded( + child: _buildSummaryCard( + 'Total Orders', + '${salesData.summary.totalOrders}', + Icons.shopping_cart, + AppColor.info, + 100, + ), + ), + ], + ), + ); + }, + ), + const SpaceHeight(12), + TweenAnimationBuilder( + tween: Tween(begin: 0.0, end: 1.0), + duration: const Duration(milliseconds: 1000), + curve: Curves.elasticOut, + builder: (context, value, child) { + return Transform.scale( + scale: value, + child: Row( + children: [ + Expanded( + child: _buildSummaryCard( + 'Avg Order Value', + formatCurrency( + salesData.summary.averageOrderValue, + ), + Icons.attach_money, + AppColor.warning, + 200, + ), + ), + SpaceWidth(12), + Expanded( + child: _buildSummaryCard( + 'Total Items', + '${salesData.summary.totalItems}', + Icons.inventory, + AppColor.primary, + 300, + ), + ), + ], + ), + ); + }, + ), + ], + ), + ), + ), + ), + ), + + // Net Sales Card + SliverToBoxAdapter( + child: SlideTransition( + position: slideAnimation, + child: FadeTransition( + opacity: fadeAnimation, + child: TweenAnimationBuilder( + tween: Tween(begin: 0.0, end: 1.0), + duration: const Duration(milliseconds: 1200), + curve: Curves.bounceOut, + builder: (context, value, child) { + return Transform.scale( + scale: value, + child: Container( + margin: const EdgeInsets.all(16), + padding: const EdgeInsets.all(20), + decoration: BoxDecoration( + gradient: const LinearGradient( + colors: AppColor.successGradient, + begin: Alignment.topLeft, + end: Alignment.bottomRight, + ), + borderRadius: BorderRadius.circular(16), + boxShadow: [ + BoxShadow( + color: AppColor.success.withOpacity(0.3), + blurRadius: 15, + offset: const Offset(0, 5), + ), + ], + ), + child: Row( + children: [ + TweenAnimationBuilder( + tween: Tween(begin: 0.0, end: 1.0), + duration: const Duration(milliseconds: 1500), + curve: Curves.elasticOut, + builder: (context, iconValue, child) { + return Transform.rotate( + angle: iconValue * 0.1, + child: Container( + padding: const EdgeInsets.all(12), + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.2), + borderRadius: BorderRadius.circular(12), + ), + child: const Icon( + Icons.account_balance_wallet, + color: AppColor.textWhite, + size: 28, + ), + ), + ); + }, + ), + SpaceWidth(16), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Net Sales', + style: TextStyle( + color: AppColor.textWhite.withOpacity( + 0.9, + ), + fontSize: 14, + fontWeight: FontWeight.w500, + ), + ), + const SpaceHeight(4), + TweenAnimationBuilder( + tween: Tween( + begin: 0.0, + end: salesData.summary.netSales, + ), + duration: const Duration( + milliseconds: 2000, + ), + curve: Curves.easeOutCubic, + builder: (context, countValue, child) { + return Text( + formatCurrency(countValue), + style: const TextStyle( + color: AppColor.textWhite, + fontSize: 24, + fontWeight: FontWeight.bold, + ), + ); + }, + ), + ], + ), + ), + ], + ), + ), + ); + }, + ), + ), + ), + ), + + // Daily Sales Section Header + SliverToBoxAdapter( + child: SlideTransition( + position: slideAnimation, + child: FadeTransition( + opacity: fadeAnimation, + child: Padding( + padding: const EdgeInsets.fromLTRB(16, 8, 16, 16), + child: Text( + 'Daily Breakdown', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + color: AppColor.textPrimary, + ), + ), + ), + ), + ), + ), + + // Daily Sales List + SliverList( + delegate: SliverChildBuilderDelegate((context, index) { + final dailySale = salesData.dailySales[index]; + return SlideTransition( + position: + Tween( + begin: Offset(index.isEven ? -1.0 : 1.0, 0), + end: Offset.zero, + ).animate( + CurvedAnimation( + parent: slideAnimationController, + curve: Interval( + 0.2 + (index * 0.1), + 0.8 + (index * 0.1), + curve: Curves.easeOutBack, + ), + ), + ), + child: FadeTransition( + opacity: Tween(begin: 0.0, end: 1.0).animate( + CurvedAnimation( + parent: fadeAnimationController, + curve: Interval( + 0.3 + (index * 0.1), + 0.9 + (index * 0.1), + curve: Curves.easeOut, + ), + ), + ), + child: Container( + margin: const EdgeInsets.symmetric( + horizontal: 16, + vertical: 6, + ), + decoration: BoxDecoration( + color: AppColor.surface, + borderRadius: BorderRadius.circular(12), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.05), + blurRadius: 8, + offset: const Offset(0, 2), + ), + ], + ), + child: _buildDailySalesItem(dailySale), + ), + ), + ); + }, childCount: salesData.dailySales.length), + ), + + // Bottom Padding + const SliverToBoxAdapter(child: SpaceHeight(32)), + ], + ), + ); + } + + Widget _buildSummaryCard( + String title, + String value, + IconData icon, + Color color, + int delay, + ) { + return SalesSummaryCard( + fadeAnimation: fadeAnimation, + title: title, + value: value, + icon: icon, + color: color, + delay: delay, + ); + } + + Widget _buildDailySalesItem(DailySales dailySale) { + return ExpansionTile( + leading: Container( + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + color: AppColor.primary.withOpacity(0.1), + borderRadius: BorderRadius.circular(10), + ), + child: Icon(Icons.calendar_today, color: AppColor.primary, size: 20), + ), + title: Text( + '${dailySale.date.day}/${dailySale.date.month}/${dailySale.date.year}', + style: const TextStyle( + fontWeight: FontWeight.bold, + color: AppColor.textPrimary, + ), + ), + subtitle: Text( + formatCurrency(dailySale.sales), + style: TextStyle( + color: AppColor.success, + fontWeight: FontWeight.w600, + fontSize: 16, + ), + ), + trailing: Container( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6), + decoration: BoxDecoration( + color: AppColor.info.withOpacity(0.1), + borderRadius: BorderRadius.circular(20), + ), + child: Text( + '${dailySale.orders} orders', + style: TextStyle( + color: AppColor.info, + fontWeight: FontWeight.w500, + fontSize: 12, + ), + ), + ), + children: [ + Padding( + padding: const EdgeInsets.all(16), + child: Row( + children: [ + Expanded( + child: _buildDetailItem( + 'Items', + '${dailySale.items}', + Icons.inventory_2, + ), + ), + Expanded( + child: _buildDetailItem( + 'Tax', + formatCurrency(dailySale.tax), + Icons.receipt, + ), + ), + Expanded( + child: _buildDetailItem( + 'Discount', + formatCurrency(dailySale.discount), + Icons.local_offer, + ), + ), + ], + ), + ), + ], + ); + } + + Widget _buildDetailItem(String label, String value, IconData icon) { + return TweenAnimationBuilder( + tween: Tween(begin: 0.0, end: 1.0), + duration: const Duration(milliseconds: 600), + curve: Curves.bounceOut, + builder: (context, animValue, child) { + return Transform.scale( + scale: animValue, + child: Column( + children: [ + TweenAnimationBuilder( + tween: Tween(begin: 0.0, end: 1.0), + duration: const Duration(milliseconds: 800), + curve: Curves.elasticOut, + builder: (context, iconValue, child) { + return Transform.rotate( + angle: iconValue * 0.1, + child: Icon(icon, color: AppColor.textSecondary, size: 20), + ); + }, + ), + const SpaceHeight(4), + Text( + label, + style: TextStyle(color: AppColor.textSecondary, fontSize: 12), + ), + const SpaceHeight(2), + AnimatedBuilder( + animation: fadeAnimation, + builder: (context, child) { + return Text( + value, + style: TextStyle( + color: AppColor.textPrimary, + fontWeight: FontWeight.w600, + fontSize: 14, + ), + ); + }, + ), + ], + ), + ); + }, + ); + } +} diff --git a/lib/presentation/pages/sales/widgets/appbar.dart b/lib/presentation/pages/sales/widgets/appbar.dart new file mode 100644 index 0000000..9dfbcf2 --- /dev/null +++ b/lib/presentation/pages/sales/widgets/appbar.dart @@ -0,0 +1,96 @@ +import 'package:flutter/material.dart'; + +import '../../../../common/theme/theme.dart'; + +class SalesAppbar extends StatelessWidget { + const SalesAppbar({super.key, required this.rotationAnimation}); + + final Animation rotationAnimation; + + @override + Widget build(BuildContext context) { + return FlexibleSpaceBar( + titlePadding: const EdgeInsets.only(left: 50, bottom: 16), + title: Text( + 'Penjualan', + style: AppStyle.xl.copyWith( + color: AppColor.textWhite, + fontWeight: FontWeight.w600, + ), + ), + background: Container( + decoration: const BoxDecoration( + gradient: LinearGradient( + colors: AppColor.primaryGradient, + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + ), + ), + child: Stack( + children: [ + Positioned( + right: -20, + top: -20, + child: AnimatedBuilder( + animation: rotationAnimation, + builder: (context, child) { + return Transform.rotate( + angle: rotationAnimation.value, + child: Container( + width: 100, + height: 100, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: AppColor.white.withOpacity(0.1), + ), + ), + ); + }, + ), + ), + Positioned( + left: -30, + bottom: -30, + child: AnimatedBuilder( + animation: rotationAnimation, + builder: (context, child) { + return Transform.rotate( + angle: -rotationAnimation.value * 0.5, + child: Container( + width: 80, + height: 80, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: AppColor.white.withOpacity(0.05), + ), + ), + ); + }, + ), + ), + Positioned( + right: 80, + bottom: 30, + child: AnimatedBuilder( + animation: rotationAnimation, + builder: (context, child) { + return Transform.rotate( + angle: -rotationAnimation.value * 0.2, + child: Container( + width: 40, + height: 40, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + color: AppColor.white.withOpacity(0.08), + ), + ), + ); + }, + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/presentation/pages/sales/widgets/summary_card.dart b/lib/presentation/pages/sales/widgets/summary_card.dart new file mode 100644 index 0000000..f8908ce --- /dev/null +++ b/lib/presentation/pages/sales/widgets/summary_card.dart @@ -0,0 +1,101 @@ +import 'package:flutter/material.dart'; + +import '../../../../common/theme/theme.dart'; + +class SalesSummaryCard extends StatelessWidget { + const SalesSummaryCard({ + super.key, + required this.fadeAnimation, + required this.title, + required this.value, + required this.icon, + required this.color, + required this.delay, + }); + + final Animation fadeAnimation; + final String title; + final String value; + final IconData icon; + final Color color; + final int delay; + + @override + Widget build(BuildContext context) { + return TweenAnimationBuilder( + tween: Tween(begin: 0.0, end: 1.0), + duration: Duration(milliseconds: 800 + delay), + curve: Curves.easeOutBack, + builder: (context, animValue, child) { + return Transform.scale( + scale: animValue, + child: Container( + padding: const EdgeInsets.all(16), + decoration: BoxDecoration( + color: AppColor.surface, + borderRadius: BorderRadius.circular(12), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.05), + blurRadius: 8, + offset: const Offset(0, 2), + ), + ], + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + TweenAnimationBuilder( + tween: Tween(begin: 0.0, end: 1.0), + duration: Duration(milliseconds: 1000 + delay), + curve: Curves.bounceOut, + builder: (context, iconValue, child) { + return Transform.scale( + scale: iconValue, + child: Container( + padding: const EdgeInsets.all(8), + decoration: BoxDecoration( + color: color.withOpacity(0.1), + borderRadius: BorderRadius.circular(8), + ), + child: Icon(icon, color: color, size: 20), + ), + ); + }, + ), + const Spacer(), + ], + ), + const SizedBox(height: 12), + Text( + title, + style: AppStyle.sm.copyWith( + color: AppColor.textSecondary, + fontSize: 12, + fontWeight: FontWeight.w500, + ), + ), + const SizedBox(height: 4), + AnimatedBuilder( + animation: fadeAnimation, + builder: (context, child) { + return Text( + value, + style: AppStyle.xl.copyWith( + color: AppColor.textPrimary, + fontSize: 18, + fontWeight: FontWeight.bold, + ), + ); + }, + ), + ], + ), + ), + ); + }, + ); + } +} diff --git a/lib/presentation/router/app_router.dart b/lib/presentation/router/app_router.dart index b70c6ed..6abc5ab 100644 --- a/lib/presentation/router/app_router.dart +++ b/lib/presentation/router/app_router.dart @@ -39,5 +39,8 @@ class AppRouter extends RootStackRouter { // Inventory AutoRoute(page: InventoryRoute.page), + + // Sales + AutoRoute(page: SalesRoute.page), ]; } diff --git a/lib/presentation/router/app_router.gr.dart b/lib/presentation/router/app_router.gr.dart index ecc9d9b..ede7c25 100644 --- a/lib/presentation/router/app_router.gr.dart +++ b/lib/presentation/router/app_router.gr.dart @@ -29,23 +29,25 @@ import 'package:apskel_owner_flutter/presentation/pages/profile/profile_page.dar as _i9; import 'package:apskel_owner_flutter/presentation/pages/report/report_page.dart' as _i10; -import 'package:apskel_owner_flutter/presentation/pages/schedule/schedule_page.dart' +import 'package:apskel_owner_flutter/presentation/pages/sales/sales_page.dart' as _i11; -import 'package:apskel_owner_flutter/presentation/pages/splash/splash_page.dart' +import 'package:apskel_owner_flutter/presentation/pages/schedule/schedule_page.dart' as _i12; -import 'package:apskel_owner_flutter/presentation/pages/transaction/transaction_page.dart' +import 'package:apskel_owner_flutter/presentation/pages/splash/splash_page.dart' as _i13; -import 'package:auto_route/auto_route.dart' as _i14; +import 'package:apskel_owner_flutter/presentation/pages/transaction/transaction_page.dart' + as _i14; +import 'package:auto_route/auto_route.dart' as _i15; /// generated route for /// [_i1.CustomerPage] -class CustomerRoute extends _i14.PageRouteInfo { - const CustomerRoute({List<_i14.PageRouteInfo>? children}) +class CustomerRoute extends _i15.PageRouteInfo { + const CustomerRoute({List<_i15.PageRouteInfo>? children}) : super(CustomerRoute.name, initialChildren: children); static const String name = 'CustomerRoute'; - static _i14.PageInfo page = _i14.PageInfo( + static _i15.PageInfo page = _i15.PageInfo( name, builder: (data) { return const _i1.CustomerPage(); @@ -55,13 +57,13 @@ class CustomerRoute extends _i14.PageRouteInfo { /// generated route for /// [_i2.DailyTasksFormPage] -class DailyTasksFormRoute extends _i14.PageRouteInfo { - const DailyTasksFormRoute({List<_i14.PageRouteInfo>? children}) +class DailyTasksFormRoute extends _i15.PageRouteInfo { + const DailyTasksFormRoute({List<_i15.PageRouteInfo>? children}) : super(DailyTasksFormRoute.name, initialChildren: children); static const String name = 'DailyTasksFormRoute'; - static _i14.PageInfo page = _i14.PageInfo( + static _i15.PageInfo page = _i15.PageInfo( name, builder: (data) { return const _i2.DailyTasksFormPage(); @@ -71,13 +73,13 @@ class DailyTasksFormRoute extends _i14.PageRouteInfo { /// generated route for /// [_i3.HomePage] -class HomeRoute extends _i14.PageRouteInfo { - const HomeRoute({List<_i14.PageRouteInfo>? children}) +class HomeRoute extends _i15.PageRouteInfo { + const HomeRoute({List<_i15.PageRouteInfo>? children}) : super(HomeRoute.name, initialChildren: children); static const String name = 'HomeRoute'; - static _i14.PageInfo page = _i14.PageInfo( + static _i15.PageInfo page = _i15.PageInfo( name, builder: (data) { return const _i3.HomePage(); @@ -87,13 +89,13 @@ class HomeRoute extends _i14.PageRouteInfo { /// generated route for /// [_i4.InventoryPage] -class InventoryRoute extends _i14.PageRouteInfo { - const InventoryRoute({List<_i14.PageRouteInfo>? children}) +class InventoryRoute extends _i15.PageRouteInfo { + const InventoryRoute({List<_i15.PageRouteInfo>? children}) : super(InventoryRoute.name, initialChildren: children); static const String name = 'InventoryRoute'; - static _i14.PageInfo page = _i14.PageInfo( + static _i15.PageInfo page = _i15.PageInfo( name, builder: (data) { return const _i4.InventoryPage(); @@ -103,13 +105,13 @@ class InventoryRoute extends _i14.PageRouteInfo { /// generated route for /// [_i5.LanguagePage] -class LanguageRoute extends _i14.PageRouteInfo { - const LanguageRoute({List<_i14.PageRouteInfo>? children}) +class LanguageRoute extends _i15.PageRouteInfo { + const LanguageRoute({List<_i15.PageRouteInfo>? children}) : super(LanguageRoute.name, initialChildren: children); static const String name = 'LanguageRoute'; - static _i14.PageInfo page = _i14.PageInfo( + static _i15.PageInfo page = _i15.PageInfo( name, builder: (data) { return const _i5.LanguagePage(); @@ -119,13 +121,13 @@ class LanguageRoute extends _i14.PageRouteInfo { /// generated route for /// [_i6.LoginPage] -class LoginRoute extends _i14.PageRouteInfo { - const LoginRoute({List<_i14.PageRouteInfo>? children}) +class LoginRoute extends _i15.PageRouteInfo { + const LoginRoute({List<_i15.PageRouteInfo>? children}) : super(LoginRoute.name, initialChildren: children); static const String name = 'LoginRoute'; - static _i14.PageInfo page = _i14.PageInfo( + static _i15.PageInfo page = _i15.PageInfo( name, builder: (data) { return const _i6.LoginPage(); @@ -135,13 +137,13 @@ class LoginRoute extends _i14.PageRouteInfo { /// generated route for /// [_i7.MainPage] -class MainRoute extends _i14.PageRouteInfo { - const MainRoute({List<_i14.PageRouteInfo>? children}) +class MainRoute extends _i15.PageRouteInfo { + const MainRoute({List<_i15.PageRouteInfo>? children}) : super(MainRoute.name, initialChildren: children); static const String name = 'MainRoute'; - static _i14.PageInfo page = _i14.PageInfo( + static _i15.PageInfo page = _i15.PageInfo( name, builder: (data) { return const _i7.MainPage(); @@ -151,13 +153,13 @@ class MainRoute extends _i14.PageRouteInfo { /// generated route for /// [_i8.ProductPage] -class ProductRoute extends _i14.PageRouteInfo { - const ProductRoute({List<_i14.PageRouteInfo>? children}) +class ProductRoute extends _i15.PageRouteInfo { + const ProductRoute({List<_i15.PageRouteInfo>? children}) : super(ProductRoute.name, initialChildren: children); static const String name = 'ProductRoute'; - static _i14.PageInfo page = _i14.PageInfo( + static _i15.PageInfo page = _i15.PageInfo( name, builder: (data) { return const _i8.ProductPage(); @@ -167,13 +169,13 @@ class ProductRoute extends _i14.PageRouteInfo { /// generated route for /// [_i9.ProfilePage] -class ProfileRoute extends _i14.PageRouteInfo { - const ProfileRoute({List<_i14.PageRouteInfo>? children}) +class ProfileRoute extends _i15.PageRouteInfo { + const ProfileRoute({List<_i15.PageRouteInfo>? children}) : super(ProfileRoute.name, initialChildren: children); static const String name = 'ProfileRoute'; - static _i14.PageInfo page = _i14.PageInfo( + static _i15.PageInfo page = _i15.PageInfo( name, builder: (data) { return const _i9.ProfilePage(); @@ -183,13 +185,13 @@ class ProfileRoute extends _i14.PageRouteInfo { /// generated route for /// [_i10.ReportPage] -class ReportRoute extends _i14.PageRouteInfo { - const ReportRoute({List<_i14.PageRouteInfo>? children}) +class ReportRoute extends _i15.PageRouteInfo { + const ReportRoute({List<_i15.PageRouteInfo>? children}) : super(ReportRoute.name, initialChildren: children); static const String name = 'ReportRoute'; - static _i14.PageInfo page = _i14.PageInfo( + static _i15.PageInfo page = _i15.PageInfo( name, builder: (data) { return const _i10.ReportPage(); @@ -198,49 +200,65 @@ class ReportRoute extends _i14.PageRouteInfo { } /// generated route for -/// [_i11.SchedulePage] -class ScheduleRoute extends _i14.PageRouteInfo { - const ScheduleRoute({List<_i14.PageRouteInfo>? children}) +/// [_i11.SalesPage] +class SalesRoute extends _i15.PageRouteInfo { + const SalesRoute({List<_i15.PageRouteInfo>? children}) + : super(SalesRoute.name, initialChildren: children); + + static const String name = 'SalesRoute'; + + static _i15.PageInfo page = _i15.PageInfo( + name, + builder: (data) { + return const _i11.SalesPage(); + }, + ); +} + +/// generated route for +/// [_i12.SchedulePage] +class ScheduleRoute extends _i15.PageRouteInfo { + const ScheduleRoute({List<_i15.PageRouteInfo>? children}) : super(ScheduleRoute.name, initialChildren: children); static const String name = 'ScheduleRoute'; - static _i14.PageInfo page = _i14.PageInfo( + static _i15.PageInfo page = _i15.PageInfo( name, builder: (data) { - return const _i11.SchedulePage(); + return const _i12.SchedulePage(); }, ); } /// generated route for -/// [_i12.SplashPage] -class SplashRoute extends _i14.PageRouteInfo { - const SplashRoute({List<_i14.PageRouteInfo>? children}) +/// [_i13.SplashPage] +class SplashRoute extends _i15.PageRouteInfo { + const SplashRoute({List<_i15.PageRouteInfo>? children}) : super(SplashRoute.name, initialChildren: children); static const String name = 'SplashRoute'; - static _i14.PageInfo page = _i14.PageInfo( + static _i15.PageInfo page = _i15.PageInfo( name, builder: (data) { - return const _i12.SplashPage(); + return const _i13.SplashPage(); }, ); } /// generated route for -/// [_i13.TransactionPage] -class TransactionRoute extends _i14.PageRouteInfo { - const TransactionRoute({List<_i14.PageRouteInfo>? children}) +/// [_i14.TransactionPage] +class TransactionRoute extends _i15.PageRouteInfo { + const TransactionRoute({List<_i15.PageRouteInfo>? children}) : super(TransactionRoute.name, initialChildren: children); static const String name = 'TransactionRoute'; - static _i14.PageInfo page = _i14.PageInfo( + static _i15.PageInfo page = _i15.PageInfo( name, builder: (data) { - return const _i13.TransactionPage(); + return const _i14.TransactionPage(); }, ); }