feat: implement authentication feature with login logic, UI components, and routing for user access
This commit is contained in:
57
assets/icons/bg_auth_dam.svg
Normal file
57
assets/icons/bg_auth_dam.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 74 KiB |
0
packages/livestock/lib/features/auth/auth.dart
Normal file
0
packages/livestock/lib/features/auth/auth.dart
Normal file
@@ -0,0 +1,72 @@
|
||||
import 'package:rasadyar_core/core.dart' hide BaseLogic;
|
||||
import 'package:rasadyar_livestock/features/common/auth/presentation/pages/logic.dart';
|
||||
import 'package:rasadyar_livestock/presentation/page/auth/view.dart';
|
||||
import 'package:rasadyar_livestock/presentation/page/map/logic.dart';
|
||||
import 'package:rasadyar_livestock/presentation/page/map/widget/map_widget/logic.dart';
|
||||
import 'package:rasadyar_livestock/presentation/page/profile/logic.dart';
|
||||
import 'package:rasadyar_livestock/presentation/page/request_tagging/logic.dart';
|
||||
import 'package:rasadyar_livestock/presentation/page/request_tagging/view.dart';
|
||||
import 'package:rasadyar_livestock/presentation/page/requests/logic.dart';
|
||||
import 'package:rasadyar_livestock/presentation/page/root/logic.dart';
|
||||
import 'package:rasadyar_livestock/presentation/page/root/view.dart';
|
||||
import 'package:rasadyar_livestock/presentation/page/tagging/logic.dart';
|
||||
import 'package:rasadyar_livestock/presentation/page/tagging/view.dart';
|
||||
import 'package:rasadyar_livestock/presentation/widgets/base_page/logic.dart';
|
||||
import 'package:rasadyar_livestock/presentation/widgets/captcha/logic.dart';
|
||||
|
||||
|
||||
part 'app_routes.dart';
|
||||
|
||||
sealed class LiveStockPages {
|
||||
LiveStockPages._();
|
||||
|
||||
static final pages = [
|
||||
GetPage(
|
||||
name: LiveStockRoutes.auth,
|
||||
page: () => AuthPage(),
|
||||
binding: BindingsBuilder(() {
|
||||
Get.lazyPut(() => AuthLogic());
|
||||
Get.lazyPut(() => CaptchaWidgetLogic());
|
||||
}),
|
||||
),
|
||||
GetPage(
|
||||
name: LiveStockRoutes.init,
|
||||
page: () => RootPage(),
|
||||
middlewares: [AuthMiddleware()],
|
||||
binding: BindingsBuilder(() {
|
||||
Get.put(RootLogic());
|
||||
Get.lazyPut(() => RequestsLogic());
|
||||
Get.lazyPut(() => MapLogic());
|
||||
Get.lazyPut(() => ProfileLogic());
|
||||
Get.lazyPut(() => MapWidgetLogic());
|
||||
Get.lazyPut(() => BaseLogic());
|
||||
}),
|
||||
children: [
|
||||
/*GetPage(
|
||||
name: LiveStockRoutes.requestTagging,
|
||||
page: () => RequestTaggingPage(),
|
||||
middlewares: [AuthMiddleware()],
|
||||
binding: BindingsBuilder(() {
|
||||
Get.lazyPut(() => RequestTaggingLogic());
|
||||
}),
|
||||
),*/
|
||||
],
|
||||
),
|
||||
GetPage(
|
||||
name: LiveStockRoutes.requestTagging,
|
||||
page: () => RequestTaggingPage(),
|
||||
middlewares: [AuthMiddleware()],
|
||||
binding: BindingsBuilder(() {
|
||||
Get.lazyPut(() => RequestTaggingLogic());
|
||||
}),
|
||||
),
|
||||
GetPage(
|
||||
name: LiveStockRoutes.tagging,
|
||||
page: () => TaggingPage(),
|
||||
middlewares: [AuthMiddleware()],
|
||||
binding: BindingsBuilder(() {
|
||||
Get.lazyPut(() => TaggingLogic());
|
||||
}),
|
||||
),
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
part of 'app_pages.dart';
|
||||
|
||||
sealed class LiveStockRoutes {
|
||||
LiveStockRoutes._();
|
||||
|
||||
static const auth = '/AuthLiveStock';
|
||||
static const init = '/liveStock';
|
||||
static const requests = '/requests';
|
||||
static const map = '/map';
|
||||
static const profile = '/profile';
|
||||
static const requestTagging = '$requests/tagging';
|
||||
static const tagging = '/tagging';
|
||||
}
|
||||
Reference in New Issue
Block a user