first commit
This commit is contained in:
10
lib/helper/helper.dart
Normal file
10
lib/helper/helper.dart
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
/// Retrieves the current date in the format "yyyy-MM-dd".
|
||||
///
|
||||
/// @return [String] A formatted date.
|
||||
String getCurrentDate(DateTime date) {
|
||||
return DateFormat("yyyy-MM-dd").format(date);
|
||||
}
|
||||
19
lib/helper/sample_bindings.dart
Normal file
19
lib/helper/sample_bindings.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../controller/home_controller.dart';
|
||||
import '../controller/login_controller.dart';
|
||||
import '../controller/signin_controller.dart';
|
||||
|
||||
|
||||
|
||||
class SampleBindings extends Bindings {
|
||||
@override
|
||||
void dependencies() {
|
||||
// Define your dependencies here no permanent Binding
|
||||
Get.lazyPut<LoginController>(() => LoginController());
|
||||
Get.lazyPut<SigninController>(() => SigninController());
|
||||
Get.lazyPut<HomeController>(() => HomeController());
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
27
lib/helper/sample_routes.dart
Normal file
27
lib/helper/sample_routes.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'sample_bindings.dart';
|
||||
import '../pages/home_view.dart';
|
||||
import '../pages/signin_view.dart';
|
||||
import '../pages/login_view.dart';
|
||||
|
||||
class SampleRouts {
|
||||
static final sampleBindings = SampleBindings();
|
||||
static List<GetPage<dynamic>> samplePages = [
|
||||
GetPage(
|
||||
name: LoginPage.namedRoute,
|
||||
page: () => const LoginPage(),
|
||||
binding: sampleBindings,
|
||||
),
|
||||
GetPage(
|
||||
name: SigninPage.namedRoute,
|
||||
page: () => const SigninPage(),
|
||||
binding: sampleBindings,
|
||||
),
|
||||
GetPage(
|
||||
name: HomePage.namedRoute,
|
||||
page: () => const HomePage(),
|
||||
binding: sampleBindings,
|
||||
),
|
||||
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user