feat: error page
This commit is contained in:
parent
6df5380aa3
commit
6cc2026f6f
509
lib/presentation/pages/error/error_page.dart
Normal file
509
lib/presentation/pages/error/error_page.dart
Normal file
@ -0,0 +1,509 @@
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../../common/theme/theme.dart';
|
||||
|
||||
@RoutePage()
|
||||
class ErrorPage extends StatefulWidget {
|
||||
final String? title;
|
||||
final String? message;
|
||||
final VoidCallback? onRetry;
|
||||
final VoidCallback? onBack;
|
||||
final String? errorCode;
|
||||
final IconData? errorIcon;
|
||||
|
||||
const ErrorPage({
|
||||
Key? key,
|
||||
this.title,
|
||||
this.message,
|
||||
this.onRetry,
|
||||
this.onBack,
|
||||
this.errorCode,
|
||||
this.errorIcon,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ErrorPage> createState() => _ErrorPageState();
|
||||
}
|
||||
|
||||
class _ErrorPageState extends State<ErrorPage> with TickerProviderStateMixin {
|
||||
late AnimationController _bounceController;
|
||||
late AnimationController _fadeController;
|
||||
late AnimationController _slideController;
|
||||
|
||||
late Animation<double> _bounceAnimation;
|
||||
late Animation<double> _fadeAnimation;
|
||||
late Animation<Offset> _slideAnimation;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
_bounceController = AnimationController(
|
||||
duration: const Duration(milliseconds: 1200),
|
||||
vsync: this,
|
||||
);
|
||||
|
||||
_fadeController = AnimationController(
|
||||
duration: const Duration(milliseconds: 800),
|
||||
vsync: this,
|
||||
);
|
||||
|
||||
_slideController = AnimationController(
|
||||
duration: const Duration(milliseconds: 1000),
|
||||
vsync: this,
|
||||
);
|
||||
|
||||
_bounceAnimation = Tween<double>(begin: 0.0, end: 1.0).animate(
|
||||
CurvedAnimation(parent: _bounceController, curve: Curves.elasticOut),
|
||||
);
|
||||
|
||||
_fadeAnimation = Tween<double>(begin: 0.0, end: 1.0).animate(
|
||||
CurvedAnimation(parent: _fadeController, curve: Curves.easeInOut),
|
||||
);
|
||||
|
||||
_slideAnimation =
|
||||
Tween<Offset>(begin: const Offset(0.0, 0.5), end: Offset.zero).animate(
|
||||
CurvedAnimation(parent: _slideController, curve: Curves.easeOutCubic),
|
||||
);
|
||||
|
||||
// Start animations
|
||||
_bounceController.forward();
|
||||
Future.delayed(const Duration(milliseconds: 300), () {
|
||||
_fadeController.forward();
|
||||
});
|
||||
Future.delayed(const Duration(milliseconds: 500), () {
|
||||
_slideController.forward();
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_bounceController.dispose();
|
||||
_fadeController.dispose();
|
||||
_slideController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
AppColor.primary.withOpacity(0.05),
|
||||
AppColor.background,
|
||||
AppColor.primaryLight.withOpacity(0.03),
|
||||
],
|
||||
),
|
||||
),
|
||||
child: SafeArea(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const SizedBox(height: 60),
|
||||
|
||||
// Animated Error Illustration
|
||||
AnimatedBuilder(
|
||||
animation: _bounceAnimation,
|
||||
builder: (context, child) {
|
||||
return Transform.scale(
|
||||
scale: _bounceAnimation.value,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// Outer glow circle
|
||||
Container(
|
||||
width: 200,
|
||||
height: 200,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
gradient: RadialGradient(
|
||||
colors: [
|
||||
AppColor.error.withOpacity(0.1),
|
||||
Colors.transparent,
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Middle circle with gradient
|
||||
Container(
|
||||
width: 140,
|
||||
height: 140,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
AppColor.error.withOpacity(0.15),
|
||||
AppColor.warning.withOpacity(0.15),
|
||||
AppColor.primary.withOpacity(0.1),
|
||||
],
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColor.error.withOpacity(0.2),
|
||||
blurRadius: 30,
|
||||
offset: const Offset(0, 10),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// Inner circle with icon
|
||||
Container(
|
||||
width: 100,
|
||||
height: 100,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
gradient: LinearGradient(
|
||||
colors: AppColor.primaryGradient,
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColor.primary.withOpacity(0.3),
|
||||
blurRadius: 20,
|
||||
offset: const Offset(0, 8),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Icon(
|
||||
widget.errorIcon ?? Icons.sentiment_dissatisfied,
|
||||
size: 50,
|
||||
color: AppColor.textWhite,
|
||||
),
|
||||
),
|
||||
|
||||
// Decorative floating dots
|
||||
...List.generate(6, (index) {
|
||||
final radius = 120.0;
|
||||
return Positioned(
|
||||
left:
|
||||
100 +
|
||||
radius *
|
||||
0.8 *
|
||||
(index.isEven ? 1 : -1) *
|
||||
(index / 6),
|
||||
top:
|
||||
100 +
|
||||
radius *
|
||||
0.6 *
|
||||
(index.isOdd ? 1 : -1) *
|
||||
(index / 6),
|
||||
child: Container(
|
||||
width: 8 + (index % 3) * 4,
|
||||
height: 8 + (index % 3) * 4,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: [
|
||||
AppColor.primary,
|
||||
AppColor.error,
|
||||
AppColor.warning,
|
||||
][index % 3].withOpacity(0.6),
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
const SizedBox(height: 40),
|
||||
|
||||
// Animated Title
|
||||
FadeTransition(
|
||||
opacity: _fadeAnimation,
|
||||
child: Text(
|
||||
widget.title ?? 'Ups! Ada Yang Salah',
|
||||
style: AppStyle.h2.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColor.primary, // warna solid
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Animated Message
|
||||
SlideTransition(
|
||||
position: _slideAnimation,
|
||||
child: FadeTransition(
|
||||
opacity: _fadeAnimation,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
margin: const EdgeInsets.symmetric(horizontal: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.surface,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColor.primary.withOpacity(0.08),
|
||||
blurRadius: 20,
|
||||
offset: const Offset(0, 8),
|
||||
),
|
||||
],
|
||||
border: Border.all(
|
||||
color: AppColor.border.withOpacity(0.5),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
widget.message ??
|
||||
'Sepertinya ada masalah teknis yang tidak terduga. Jangan khawatir, tim kami sedang bekerja keras untuk memperbaikinya!',
|
||||
style: AppStyle.lg.copyWith(
|
||||
color: AppColor.textSecondary,
|
||||
height: 1.6,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
|
||||
if (widget.errorCode != null) ...[
|
||||
const SizedBox(height: 16),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
vertical: 8,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
AppColor.error.withOpacity(0.1),
|
||||
AppColor.warning.withOpacity(0.1),
|
||||
],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
border: Border.all(
|
||||
color: AppColor.error.withOpacity(0.3),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.code,
|
||||
size: 16,
|
||||
color: AppColor.error,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Kode Error: ${widget.errorCode}',
|
||||
style: AppStyle.sm.copyWith(
|
||||
color: AppColor.error,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 50),
|
||||
|
||||
// Animated Buttons
|
||||
SlideTransition(
|
||||
position: _slideAnimation,
|
||||
child: FadeTransition(
|
||||
opacity: _fadeAnimation,
|
||||
child: Column(
|
||||
children: [
|
||||
// Retry Button with gradient
|
||||
if (widget.onRetry != null)
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 60,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: AppColor.primaryGradient,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColor.primary.withOpacity(0.4),
|
||||
blurRadius: 15,
|
||||
offset: const Offset(0, 8),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: ElevatedButton.icon(
|
||||
onPressed: widget.onRetry,
|
||||
icon: const Icon(
|
||||
Icons.refresh_rounded,
|
||||
color: AppColor.textWhite,
|
||||
size: 24,
|
||||
),
|
||||
label: Text(
|
||||
'Coba Lagi',
|
||||
style: AppStyle.xl.copyWith(
|
||||
color: AppColor.textWhite,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.transparent,
|
||||
shadowColor: Colors.transparent,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Back Button with modern design
|
||||
if (widget.onBack != null)
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 60,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.surface,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
border: Border.all(
|
||||
width: 2,
|
||||
color: AppColor.primary.withOpacity(0.3),
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColor.primary.withOpacity(0.1),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: OutlinedButton.icon(
|
||||
onPressed: widget.onBack,
|
||||
icon: Icon(
|
||||
Icons.arrow_back_ios_rounded,
|
||||
color: AppColor.primary,
|
||||
size: 20,
|
||||
),
|
||||
label: Text(
|
||||
'Kembali',
|
||||
style: AppStyle.xl.copyWith(
|
||||
color: AppColor.primary,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
style: OutlinedButton.styleFrom(
|
||||
backgroundColor: Colors.transparent,
|
||||
side: BorderSide.none,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 40),
|
||||
|
||||
// Help text with icon
|
||||
FadeTransition(
|
||||
opacity: _fadeAnimation,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.info.withOpacity(0.05),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: AppColor.info.withOpacity(0.1)),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.help_outline_rounded,
|
||||
size: 18,
|
||||
color: AppColor.info,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Flexible(
|
||||
child: Text(
|
||||
'Butuh bantuan? Hubungi tim support kami',
|
||||
style: AppStyle.sm.copyWith(
|
||||
color: AppColor.info,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Usage Example dengan berbagai variasi
|
||||
class ErrorPageExamples extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
// Network Error
|
||||
ElevatedButton(
|
||||
onPressed: () => Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ErrorPage(
|
||||
title: 'Koneksi Terputus',
|
||||
message:
|
||||
'Sepertinya koneksi internet Anda bermasalah. Periksa jaringan dan coba lagi.',
|
||||
errorCode: 'NET_404',
|
||||
errorIcon: Icons.wifi_off_rounded,
|
||||
onRetry: () => Navigator.pop(context),
|
||||
onBack: () => Navigator.pop(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Text('Network Error'),
|
||||
),
|
||||
|
||||
// Server Error
|
||||
ElevatedButton(
|
||||
onPressed: () => Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => ErrorPage(
|
||||
title: 'Server Sibuk',
|
||||
message:
|
||||
'Server sedang mengalami gangguan. Tim kami sedang memperbaikinya.',
|
||||
errorCode: 'SRV_500',
|
||||
errorIcon: Icons.dns_rounded,
|
||||
onRetry: () => Navigator.pop(context),
|
||||
onBack: () => Navigator.pop(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Text('Server Error'),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -48,5 +48,8 @@ class AppRouter extends RootStackRouter {
|
||||
|
||||
// Finance page
|
||||
AutoRoute(page: FinanceRoute.page),
|
||||
|
||||
// Error
|
||||
AutoRoute(page: ErrorRoute.page),
|
||||
];
|
||||
}
|
||||
|
||||
@ -10,48 +10,51 @@
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'package:apskel_owner_flutter/presentation/pages/auth/login/login_page.dart'
|
||||
as _i7;
|
||||
as _i8;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/customer/customer_page.dart'
|
||||
as _i1;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/finance/finance_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/error/error_page.dart'
|
||||
as _i3;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/finance/finance_page.dart'
|
||||
as _i4;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/form/daily_task_form_page.dart'
|
||||
as _i2;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/home/home_page.dart'
|
||||
as _i4;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/inventory/inventory_page.dart'
|
||||
as _i5;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/language/language_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/inventory/inventory_page.dart'
|
||||
as _i6;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/language/language_page.dart'
|
||||
as _i7;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/main/main_page.dart'
|
||||
as _i8;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/product/product_page.dart'
|
||||
as _i9;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/profile/profile_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/product/product_page.dart'
|
||||
as _i10;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/purchase/purchase_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/profile/profile_page.dart'
|
||||
as _i11;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/report/report_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/purchase/purchase_page.dart'
|
||||
as _i12;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/sales/sales_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/report/report_page.dart'
|
||||
as _i13;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/schedule/schedule_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/sales/sales_page.dart'
|
||||
as _i14;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/splash/splash_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/schedule/schedule_page.dart'
|
||||
as _i15;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/transaction/transaction_page.dart'
|
||||
import 'package:apskel_owner_flutter/presentation/pages/splash/splash_page.dart'
|
||||
as _i16;
|
||||
import 'package:auto_route/auto_route.dart' as _i17;
|
||||
import 'package:apskel_owner_flutter/presentation/pages/transaction/transaction_page.dart'
|
||||
as _i17;
|
||||
import 'package:auto_route/auto_route.dart' as _i18;
|
||||
import 'package:flutter/material.dart' as _i19;
|
||||
|
||||
/// generated route for
|
||||
/// [_i1.CustomerPage]
|
||||
class CustomerRoute extends _i17.PageRouteInfo<void> {
|
||||
const CustomerRoute({List<_i17.PageRouteInfo>? children})
|
||||
class CustomerRoute extends _i18.PageRouteInfo<void> {
|
||||
const CustomerRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(CustomerRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'CustomerRoute';
|
||||
|
||||
static _i17.PageInfo page = _i17.PageInfo(
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i1.CustomerPage();
|
||||
@ -61,13 +64,13 @@ class CustomerRoute extends _i17.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i2.DailyTasksFormPage]
|
||||
class DailyTasksFormRoute extends _i17.PageRouteInfo<void> {
|
||||
const DailyTasksFormRoute({List<_i17.PageRouteInfo>? children})
|
||||
class DailyTasksFormRoute extends _i18.PageRouteInfo<void> {
|
||||
const DailyTasksFormRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(DailyTasksFormRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'DailyTasksFormRoute';
|
||||
|
||||
static _i17.PageInfo page = _i17.PageInfo(
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i2.DailyTasksFormPage();
|
||||
@ -76,225 +79,297 @@ class DailyTasksFormRoute extends _i17.PageRouteInfo<void> {
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i3.FinancePage]
|
||||
class FinanceRoute extends _i17.PageRouteInfo<void> {
|
||||
const FinanceRoute({List<_i17.PageRouteInfo>? children})
|
||||
/// [_i3.ErrorPage]
|
||||
class ErrorRoute extends _i18.PageRouteInfo<ErrorRouteArgs> {
|
||||
ErrorRoute({
|
||||
_i19.Key? key,
|
||||
String? title,
|
||||
String? message,
|
||||
_i19.VoidCallback? onRetry,
|
||||
_i19.VoidCallback? onBack,
|
||||
String? errorCode,
|
||||
List<_i18.PageRouteInfo>? children,
|
||||
}) : super(
|
||||
ErrorRoute.name,
|
||||
args: ErrorRouteArgs(
|
||||
key: key,
|
||||
title: title,
|
||||
message: message,
|
||||
onRetry: onRetry,
|
||||
onBack: onBack,
|
||||
errorCode: errorCode,
|
||||
),
|
||||
initialChildren: children,
|
||||
);
|
||||
|
||||
static const String name = 'ErrorRoute';
|
||||
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
final args = data.argsAs<ErrorRouteArgs>(
|
||||
orElse: () => const ErrorRouteArgs(),
|
||||
);
|
||||
return _i3.ErrorPage(
|
||||
key: args.key,
|
||||
title: args.title,
|
||||
message: args.message,
|
||||
onRetry: args.onRetry,
|
||||
onBack: args.onBack,
|
||||
errorCode: args.errorCode,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
class ErrorRouteArgs {
|
||||
const ErrorRouteArgs({
|
||||
this.key,
|
||||
this.title,
|
||||
this.message,
|
||||
this.onRetry,
|
||||
this.onBack,
|
||||
this.errorCode,
|
||||
});
|
||||
|
||||
final _i19.Key? key;
|
||||
|
||||
final String? title;
|
||||
|
||||
final String? message;
|
||||
|
||||
final _i19.VoidCallback? onRetry;
|
||||
|
||||
final _i19.VoidCallback? onBack;
|
||||
|
||||
final String? errorCode;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ErrorRouteArgs{key: $key, title: $title, message: $message, onRetry: $onRetry, onBack: $onBack, errorCode: $errorCode}';
|
||||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i4.FinancePage]
|
||||
class FinanceRoute extends _i18.PageRouteInfo<void> {
|
||||
const FinanceRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(FinanceRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'FinanceRoute';
|
||||
|
||||
static _i17.PageInfo page = _i17.PageInfo(
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i3.FinancePage();
|
||||
return const _i4.FinancePage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i4.HomePage]
|
||||
class HomeRoute extends _i17.PageRouteInfo<void> {
|
||||
const HomeRoute({List<_i17.PageRouteInfo>? children})
|
||||
/// [_i5.HomePage]
|
||||
class HomeRoute extends _i18.PageRouteInfo<void> {
|
||||
const HomeRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(HomeRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'HomeRoute';
|
||||
|
||||
static _i17.PageInfo page = _i17.PageInfo(
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i4.HomePage();
|
||||
return const _i5.HomePage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i5.InventoryPage]
|
||||
class InventoryRoute extends _i17.PageRouteInfo<void> {
|
||||
const InventoryRoute({List<_i17.PageRouteInfo>? children})
|
||||
/// [_i6.InventoryPage]
|
||||
class InventoryRoute extends _i18.PageRouteInfo<void> {
|
||||
const InventoryRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(InventoryRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'InventoryRoute';
|
||||
|
||||
static _i17.PageInfo page = _i17.PageInfo(
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i5.InventoryPage();
|
||||
return const _i6.InventoryPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i6.LanguagePage]
|
||||
class LanguageRoute extends _i17.PageRouteInfo<void> {
|
||||
const LanguageRoute({List<_i17.PageRouteInfo>? children})
|
||||
/// [_i7.LanguagePage]
|
||||
class LanguageRoute extends _i18.PageRouteInfo<void> {
|
||||
const LanguageRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(LanguageRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'LanguageRoute';
|
||||
|
||||
static _i17.PageInfo page = _i17.PageInfo(
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i6.LanguagePage();
|
||||
return const _i7.LanguagePage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i7.LoginPage]
|
||||
class LoginRoute extends _i17.PageRouteInfo<void> {
|
||||
const LoginRoute({List<_i17.PageRouteInfo>? children})
|
||||
/// [_i8.LoginPage]
|
||||
class LoginRoute extends _i18.PageRouteInfo<void> {
|
||||
const LoginRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(LoginRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'LoginRoute';
|
||||
|
||||
static _i17.PageInfo page = _i17.PageInfo(
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i17.WrappedRoute(child: const _i7.LoginPage());
|
||||
return _i18.WrappedRoute(child: const _i8.LoginPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i8.MainPage]
|
||||
class MainRoute extends _i17.PageRouteInfo<void> {
|
||||
const MainRoute({List<_i17.PageRouteInfo>? children})
|
||||
/// [_i9.MainPage]
|
||||
class MainRoute extends _i18.PageRouteInfo<void> {
|
||||
const MainRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(MainRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'MainRoute';
|
||||
|
||||
static _i17.PageInfo page = _i17.PageInfo(
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i8.MainPage();
|
||||
return const _i9.MainPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i9.ProductPage]
|
||||
class ProductRoute extends _i17.PageRouteInfo<void> {
|
||||
const ProductRoute({List<_i17.PageRouteInfo>? children})
|
||||
/// [_i10.ProductPage]
|
||||
class ProductRoute extends _i18.PageRouteInfo<void> {
|
||||
const ProductRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(ProductRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ProductRoute';
|
||||
|
||||
static _i17.PageInfo page = _i17.PageInfo(
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i9.ProductPage();
|
||||
return _i18.WrappedRoute(child: const _i10.ProductPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i10.ProfilePage]
|
||||
class ProfileRoute extends _i17.PageRouteInfo<void> {
|
||||
const ProfileRoute({List<_i17.PageRouteInfo>? children})
|
||||
/// [_i11.ProfilePage]
|
||||
class ProfileRoute extends _i18.PageRouteInfo<void> {
|
||||
const ProfileRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(ProfileRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ProfileRoute';
|
||||
|
||||
static _i17.PageInfo page = _i17.PageInfo(
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i17.WrappedRoute(child: const _i10.ProfilePage());
|
||||
return _i18.WrappedRoute(child: const _i11.ProfilePage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i11.PurchasePage]
|
||||
class PurchaseRoute extends _i17.PageRouteInfo<void> {
|
||||
const PurchaseRoute({List<_i17.PageRouteInfo>? children})
|
||||
/// [_i12.PurchasePage]
|
||||
class PurchaseRoute extends _i18.PageRouteInfo<void> {
|
||||
const PurchaseRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(PurchaseRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'PurchaseRoute';
|
||||
|
||||
static _i17.PageInfo page = _i17.PageInfo(
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i11.PurchasePage();
|
||||
return const _i12.PurchasePage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i12.ReportPage]
|
||||
class ReportRoute extends _i17.PageRouteInfo<void> {
|
||||
const ReportRoute({List<_i17.PageRouteInfo>? children})
|
||||
/// [_i13.ReportPage]
|
||||
class ReportRoute extends _i18.PageRouteInfo<void> {
|
||||
const ReportRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(ReportRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ReportRoute';
|
||||
|
||||
static _i17.PageInfo page = _i17.PageInfo(
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i12.ReportPage();
|
||||
return const _i13.ReportPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i13.SalesPage]
|
||||
class SalesRoute extends _i17.PageRouteInfo<void> {
|
||||
const SalesRoute({List<_i17.PageRouteInfo>? children})
|
||||
/// [_i14.SalesPage]
|
||||
class SalesRoute extends _i18.PageRouteInfo<void> {
|
||||
const SalesRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(SalesRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SalesRoute';
|
||||
|
||||
static _i17.PageInfo page = _i17.PageInfo(
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return _i17.WrappedRoute(child: const _i13.SalesPage());
|
||||
return _i18.WrappedRoute(child: const _i14.SalesPage());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i14.SchedulePage]
|
||||
class ScheduleRoute extends _i17.PageRouteInfo<void> {
|
||||
const ScheduleRoute({List<_i17.PageRouteInfo>? children})
|
||||
/// [_i15.SchedulePage]
|
||||
class ScheduleRoute extends _i18.PageRouteInfo<void> {
|
||||
const ScheduleRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(ScheduleRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'ScheduleRoute';
|
||||
|
||||
static _i17.PageInfo page = _i17.PageInfo(
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i14.SchedulePage();
|
||||
return const _i15.SchedulePage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i15.SplashPage]
|
||||
class SplashRoute extends _i17.PageRouteInfo<void> {
|
||||
const SplashRoute({List<_i17.PageRouteInfo>? children})
|
||||
/// [_i16.SplashPage]
|
||||
class SplashRoute extends _i18.PageRouteInfo<void> {
|
||||
const SplashRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(SplashRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'SplashRoute';
|
||||
|
||||
static _i17.PageInfo page = _i17.PageInfo(
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i15.SplashPage();
|
||||
return const _i16.SplashPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i16.TransactionPage]
|
||||
class TransactionRoute extends _i17.PageRouteInfo<void> {
|
||||
const TransactionRoute({List<_i17.PageRouteInfo>? children})
|
||||
/// [_i17.TransactionPage]
|
||||
class TransactionRoute extends _i18.PageRouteInfo<void> {
|
||||
const TransactionRoute({List<_i18.PageRouteInfo>? children})
|
||||
: super(TransactionRoute.name, initialChildren: children);
|
||||
|
||||
static const String name = 'TransactionRoute';
|
||||
|
||||
static _i17.PageInfo page = _i17.PageInfo(
|
||||
static _i18.PageInfo page = _i18.PageInfo(
|
||||
name,
|
||||
builder: (data) {
|
||||
return const _i16.TransactionPage();
|
||||
return const _i17.TransactionPage();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user