added kode otp page, input informasi diri page, and user index tracking page, repair the back button on UserIndexTrackingView
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
// **************************************************************************
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'package:flutter/material.dart' as _i7;
|
||||
import 'package:flutter/material.dart' as _i8;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:reza_app/ui/views/daftar_user_ui/input_informasi_diri/input_informasi_diri_view.dart'
|
||||
as _i6;
|
||||
@ -15,8 +15,18 @@ import 'package:reza_app/ui/views/daftar_user_ui/verifikasi_no_hp/verifikasi_no_
|
||||
as _i5;
|
||||
import 'package:reza_app/ui/views/login_user/login_user_view.dart' as _i3;
|
||||
import 'package:reza_app/ui/views/splash_screen/splash_screen_view.dart' as _i2;
|
||||
import 'package:reza_app/ui/views/user_ui/akun_user/akun_user_view.dart'
|
||||
as _i12;
|
||||
import 'package:reza_app/ui/views/user_ui/makanan_list/makanan_list_view.dart'
|
||||
as _i10;
|
||||
import 'package:reza_app/ui/views/user_ui/pesanan_list/pesanan_list_view.dart'
|
||||
as _i11;
|
||||
import 'package:reza_app/ui/views/user_ui/reservasi_meja/reservasi_meja_view.dart'
|
||||
as _i9;
|
||||
import 'package:reza_app/ui/views/user_ui/user_index_tracking/user_index_tracking_view.dart'
|
||||
as _i7;
|
||||
import 'package:stacked/stacked.dart' as _i1;
|
||||
import 'package:stacked_services/stacked_services.dart' as _i8;
|
||||
import 'package:stacked_services/stacked_services.dart' as _i13;
|
||||
|
||||
class Routes {
|
||||
static const splashScreenView = '/';
|
||||
@ -29,12 +39,15 @@ class Routes {
|
||||
|
||||
static const inputInformasiDiriView = '/input-informasi-diri-view';
|
||||
|
||||
static const userIndexTrackingView = '/user-index-tracking-view';
|
||||
|
||||
static const all = <String>{
|
||||
splashScreenView,
|
||||
loginUserView,
|
||||
masukanNoHpView,
|
||||
verifikasiNoHpView,
|
||||
inputInformasiDiriView,
|
||||
userIndexTrackingView,
|
||||
};
|
||||
}
|
||||
|
||||
@ -60,36 +73,146 @@ class StackedRouter extends _i1.RouterBase {
|
||||
Routes.inputInformasiDiriView,
|
||||
page: _i6.InputInformasiDiriView,
|
||||
),
|
||||
_i1.RouteDef(
|
||||
Routes.userIndexTrackingView,
|
||||
page: _i7.UserIndexTrackingView,
|
||||
),
|
||||
];
|
||||
|
||||
final _pagesMap = <Type, _i1.StackedRouteFactory>{
|
||||
_i2.SplashScreenView: (data) {
|
||||
return _i7.MaterialPageRoute<dynamic>(
|
||||
return _i8.MaterialPageRoute<dynamic>(
|
||||
builder: (context) => const _i2.SplashScreenView(),
|
||||
settings: data,
|
||||
);
|
||||
},
|
||||
_i3.LoginUserView: (data) {
|
||||
return _i7.MaterialPageRoute<dynamic>(
|
||||
return _i8.MaterialPageRoute<dynamic>(
|
||||
builder: (context) => const _i3.LoginUserView(),
|
||||
settings: data,
|
||||
);
|
||||
},
|
||||
_i4.MasukanNoHpView: (data) {
|
||||
return _i7.MaterialPageRoute<dynamic>(
|
||||
return _i8.MaterialPageRoute<dynamic>(
|
||||
builder: (context) => const _i4.MasukanNoHpView(),
|
||||
settings: data,
|
||||
);
|
||||
},
|
||||
_i5.VerifikasiNoHpView: (data) {
|
||||
return _i7.MaterialPageRoute<dynamic>(
|
||||
return _i8.MaterialPageRoute<dynamic>(
|
||||
builder: (context) => const _i5.VerifikasiNoHpView(),
|
||||
settings: data,
|
||||
);
|
||||
},
|
||||
_i6.InputInformasiDiriView: (data) {
|
||||
return _i7.MaterialPageRoute<dynamic>(
|
||||
builder: (context) => const _i6.InputInformasiDiriView(),
|
||||
final args = data.getArgs<InputInformasiDiriViewArguments>(nullOk: false);
|
||||
return _i8.MaterialPageRoute<dynamic>(
|
||||
builder: (context) =>
|
||||
_i6.InputInformasiDiriView(key: args.key, noHp: args.noHp),
|
||||
settings: data,
|
||||
);
|
||||
},
|
||||
_i7.UserIndexTrackingView: (data) {
|
||||
return _i8.MaterialPageRoute<dynamic>(
|
||||
builder: (context) => const _i7.UserIndexTrackingView(),
|
||||
settings: data,
|
||||
fullscreenDialog: true,
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
@override
|
||||
List<_i1.RouteDef> get routes => _routes;
|
||||
@override
|
||||
Map<Type, _i1.StackedRouteFactory> get pagesMap => _pagesMap;
|
||||
}
|
||||
|
||||
class InputInformasiDiriViewArguments {
|
||||
const InputInformasiDiriViewArguments({
|
||||
this.key,
|
||||
required this.noHp,
|
||||
});
|
||||
|
||||
final _i8.Key? key;
|
||||
|
||||
final String noHp;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return '{"key": "$key", "noHp": "$noHp"}';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(covariant InputInformasiDiriViewArguments other) {
|
||||
if (identical(this, other)) return true;
|
||||
return other.key == key && other.noHp == noHp;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return key.hashCode ^ noHp.hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
class UserIndexTrackingViewRoutes {
|
||||
static const reservasiMejaView = '';
|
||||
|
||||
static const makananListView = 'makanan-list-view';
|
||||
|
||||
static const pesananListView = 'pesanan-list-view';
|
||||
|
||||
static const akunUserView = 'akun-user-view';
|
||||
|
||||
static const all = <String>{
|
||||
reservasiMejaView,
|
||||
makananListView,
|
||||
pesananListView,
|
||||
akunUserView,
|
||||
};
|
||||
}
|
||||
|
||||
class UserIndexTrackingViewRouter extends _i1.RouterBase {
|
||||
final _routes = <_i1.RouteDef>[
|
||||
_i1.RouteDef(
|
||||
UserIndexTrackingViewRoutes.reservasiMejaView,
|
||||
page: _i9.ReservasiMejaView,
|
||||
),
|
||||
_i1.RouteDef(
|
||||
UserIndexTrackingViewRoutes.makananListView,
|
||||
page: _i10.MakananListView,
|
||||
),
|
||||
_i1.RouteDef(
|
||||
UserIndexTrackingViewRoutes.pesananListView,
|
||||
page: _i11.PesananListView,
|
||||
),
|
||||
_i1.RouteDef(
|
||||
UserIndexTrackingViewRoutes.akunUserView,
|
||||
page: _i12.AkunUserView,
|
||||
),
|
||||
];
|
||||
|
||||
final _pagesMap = <Type, _i1.StackedRouteFactory>{
|
||||
_i9.ReservasiMejaView: (data) {
|
||||
return _i8.MaterialPageRoute<dynamic>(
|
||||
builder: (context) => const _i9.ReservasiMejaView(),
|
||||
settings: data,
|
||||
);
|
||||
},
|
||||
_i10.MakananListView: (data) {
|
||||
return _i8.MaterialPageRoute<dynamic>(
|
||||
builder: (context) => const _i10.MakananListView(),
|
||||
settings: data,
|
||||
);
|
||||
},
|
||||
_i11.PesananListView: (data) {
|
||||
return _i8.MaterialPageRoute<dynamic>(
|
||||
builder: (context) => const _i11.PesananListView(),
|
||||
settings: data,
|
||||
);
|
||||
},
|
||||
_i12.AkunUserView: (data) {
|
||||
return _i8.MaterialPageRoute<dynamic>(
|
||||
builder: (context) => const _i12.AkunUserView(),
|
||||
settings: data,
|
||||
);
|
||||
},
|
||||
@ -101,7 +224,7 @@ class StackedRouter extends _i1.RouterBase {
|
||||
Map<Type, _i1.StackedRouteFactory> get pagesMap => _pagesMap;
|
||||
}
|
||||
|
||||
extension NavigatorStateExtension on _i8.NavigationService {
|
||||
extension NavigatorStateExtension on _i13.NavigationService {
|
||||
Future<dynamic> navigateToSplashScreenView([
|
||||
int? routerId,
|
||||
bool preventDuplicates = true,
|
||||
@ -158,14 +281,88 @@ extension NavigatorStateExtension on _i8.NavigationService {
|
||||
transition: transition);
|
||||
}
|
||||
|
||||
Future<dynamic> navigateToInputInformasiDiriView([
|
||||
Future<dynamic> navigateToInputInformasiDiriView({
|
||||
_i8.Key? key,
|
||||
required String noHp,
|
||||
int? routerId,
|
||||
bool preventDuplicates = true,
|
||||
Map<String, String>? parameters,
|
||||
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||
transition,
|
||||
}) async {
|
||||
return navigateTo<dynamic>(Routes.inputInformasiDiriView,
|
||||
arguments: InputInformasiDiriViewArguments(key: key, noHp: noHp),
|
||||
id: routerId,
|
||||
preventDuplicates: preventDuplicates,
|
||||
parameters: parameters,
|
||||
transition: transition);
|
||||
}
|
||||
|
||||
Future<dynamic> navigateToUserIndexTrackingView([
|
||||
int? routerId,
|
||||
bool preventDuplicates = true,
|
||||
Map<String, String>? parameters,
|
||||
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||
transition,
|
||||
]) async {
|
||||
return navigateTo<dynamic>(Routes.inputInformasiDiriView,
|
||||
return navigateTo<dynamic>(Routes.userIndexTrackingView,
|
||||
id: routerId,
|
||||
preventDuplicates: preventDuplicates,
|
||||
parameters: parameters,
|
||||
transition: transition);
|
||||
}
|
||||
|
||||
Future<dynamic>
|
||||
navigateToNestedReservasiMejaViewInUserIndexTrackingViewRouter([
|
||||
int? routerId,
|
||||
bool preventDuplicates = true,
|
||||
Map<String, String>? parameters,
|
||||
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||
transition,
|
||||
]) async {
|
||||
return navigateTo<dynamic>(UserIndexTrackingViewRoutes.reservasiMejaView,
|
||||
id: routerId,
|
||||
preventDuplicates: preventDuplicates,
|
||||
parameters: parameters,
|
||||
transition: transition);
|
||||
}
|
||||
|
||||
Future<dynamic> navigateToNestedMakananListViewInUserIndexTrackingViewRouter([
|
||||
int? routerId,
|
||||
bool preventDuplicates = true,
|
||||
Map<String, String>? parameters,
|
||||
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||
transition,
|
||||
]) async {
|
||||
return navigateTo<dynamic>(UserIndexTrackingViewRoutes.makananListView,
|
||||
id: routerId,
|
||||
preventDuplicates: preventDuplicates,
|
||||
parameters: parameters,
|
||||
transition: transition);
|
||||
}
|
||||
|
||||
Future<dynamic> navigateToNestedPesananListViewInUserIndexTrackingViewRouter([
|
||||
int? routerId,
|
||||
bool preventDuplicates = true,
|
||||
Map<String, String>? parameters,
|
||||
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||
transition,
|
||||
]) async {
|
||||
return navigateTo<dynamic>(UserIndexTrackingViewRoutes.pesananListView,
|
||||
id: routerId,
|
||||
preventDuplicates: preventDuplicates,
|
||||
parameters: parameters,
|
||||
transition: transition);
|
||||
}
|
||||
|
||||
Future<dynamic> navigateToNestedAkunUserViewInUserIndexTrackingViewRouter([
|
||||
int? routerId,
|
||||
bool preventDuplicates = true,
|
||||
Map<String, String>? parameters,
|
||||
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||
transition,
|
||||
]) async {
|
||||
return navigateTo<dynamic>(UserIndexTrackingViewRoutes.akunUserView,
|
||||
id: routerId,
|
||||
preventDuplicates: preventDuplicates,
|
||||
parameters: parameters,
|
||||
@ -228,14 +425,90 @@ extension NavigatorStateExtension on _i8.NavigationService {
|
||||
transition: transition);
|
||||
}
|
||||
|
||||
Future<dynamic> replaceWithInputInformasiDiriView([
|
||||
Future<dynamic> replaceWithInputInformasiDiriView({
|
||||
_i8.Key? key,
|
||||
required String noHp,
|
||||
int? routerId,
|
||||
bool preventDuplicates = true,
|
||||
Map<String, String>? parameters,
|
||||
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||
transition,
|
||||
}) async {
|
||||
return replaceWith<dynamic>(Routes.inputInformasiDiriView,
|
||||
arguments: InputInformasiDiriViewArguments(key: key, noHp: noHp),
|
||||
id: routerId,
|
||||
preventDuplicates: preventDuplicates,
|
||||
parameters: parameters,
|
||||
transition: transition);
|
||||
}
|
||||
|
||||
Future<dynamic> replaceWithUserIndexTrackingView([
|
||||
int? routerId,
|
||||
bool preventDuplicates = true,
|
||||
Map<String, String>? parameters,
|
||||
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||
transition,
|
||||
]) async {
|
||||
return replaceWith<dynamic>(Routes.inputInformasiDiriView,
|
||||
return replaceWith<dynamic>(Routes.userIndexTrackingView,
|
||||
id: routerId,
|
||||
preventDuplicates: preventDuplicates,
|
||||
parameters: parameters,
|
||||
transition: transition);
|
||||
}
|
||||
|
||||
Future<dynamic>
|
||||
replaceWithNestedReservasiMejaViewInUserIndexTrackingViewRouter([
|
||||
int? routerId,
|
||||
bool preventDuplicates = true,
|
||||
Map<String, String>? parameters,
|
||||
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||
transition,
|
||||
]) async {
|
||||
return replaceWith<dynamic>(UserIndexTrackingViewRoutes.reservasiMejaView,
|
||||
id: routerId,
|
||||
preventDuplicates: preventDuplicates,
|
||||
parameters: parameters,
|
||||
transition: transition);
|
||||
}
|
||||
|
||||
Future<dynamic>
|
||||
replaceWithNestedMakananListViewInUserIndexTrackingViewRouter([
|
||||
int? routerId,
|
||||
bool preventDuplicates = true,
|
||||
Map<String, String>? parameters,
|
||||
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||
transition,
|
||||
]) async {
|
||||
return replaceWith<dynamic>(UserIndexTrackingViewRoutes.makananListView,
|
||||
id: routerId,
|
||||
preventDuplicates: preventDuplicates,
|
||||
parameters: parameters,
|
||||
transition: transition);
|
||||
}
|
||||
|
||||
Future<dynamic>
|
||||
replaceWithNestedPesananListViewInUserIndexTrackingViewRouter([
|
||||
int? routerId,
|
||||
bool preventDuplicates = true,
|
||||
Map<String, String>? parameters,
|
||||
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||
transition,
|
||||
]) async {
|
||||
return replaceWith<dynamic>(UserIndexTrackingViewRoutes.pesananListView,
|
||||
id: routerId,
|
||||
preventDuplicates: preventDuplicates,
|
||||
parameters: parameters,
|
||||
transition: transition);
|
||||
}
|
||||
|
||||
Future<dynamic> replaceWithNestedAkunUserViewInUserIndexTrackingViewRouter([
|
||||
int? routerId,
|
||||
bool preventDuplicates = true,
|
||||
Map<String, String>? parameters,
|
||||
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||
transition,
|
||||
]) async {
|
||||
return replaceWith<dynamic>(UserIndexTrackingViewRoutes.akunUserView,
|
||||
id: routerId,
|
||||
preventDuplicates: preventDuplicates,
|
||||
parameters: parameters,
|
||||
|
||||
Reference in New Issue
Block a user