2024-09-02 ほぼOK
This commit is contained in:
@ -2,6 +2,8 @@ import 'package:get/get.dart';
|
||||
import 'package:gifunavi/pages/team/member_controller.dart';
|
||||
import 'package:gifunavi/services/api_service.dart';
|
||||
|
||||
import '../index/index_controller.dart';
|
||||
|
||||
class MemberBinding extends Bindings {
|
||||
@override
|
||||
void dependencies() {
|
||||
|
||||
@ -2,10 +2,15 @@ import 'package:get/get.dart';
|
||||
import 'package:gifunavi/pages/team/team_controller.dart';
|
||||
import 'package:gifunavi/services/api_service.dart';
|
||||
|
||||
//import '../entry/entry_controller.dart';
|
||||
import '../index/index_controller.dart';
|
||||
|
||||
class TeamBinding extends Bindings {
|
||||
@override
|
||||
void dependencies() {
|
||||
Get.lazyPut<ApiService>(() => ApiService());
|
||||
Get.lazyPut<TeamController>(() => TeamController());
|
||||
Get.lazyPut<TeamController>(() => TeamController(
|
||||
apiService:Get.find<ApiService>())
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -15,8 +15,14 @@ import 'package:gifunavi/model/event.dart';
|
||||
|
||||
|
||||
class TeamController extends GetxController {
|
||||
late final ApiService _apiService;
|
||||
late final EntryController _entryController;
|
||||
final ApiService _apiService;
|
||||
//final EntryController _entryController;
|
||||
|
||||
TeamController({
|
||||
required ApiService apiService,
|
||||
//required EntryController entryController,
|
||||
}) : _apiService = apiService;
|
||||
//_entryController = entryController;
|
||||
|
||||
final teams = <Team>[].obs;
|
||||
final categories = <NewCategory>[].obs;
|
||||
@ -35,12 +41,12 @@ class TeamController extends GetxController {
|
||||
void onInit() async {
|
||||
super.onInit();
|
||||
try {
|
||||
_apiService = Get.find<ApiService>();
|
||||
//_apiService = Get.find<ApiService>();
|
||||
|
||||
if (!Get.isRegistered<EntryController>()) {
|
||||
Get.put(EntryController());
|
||||
}
|
||||
_entryController = Get.find<EntryController>();
|
||||
//if (!Get.isRegistered<EntryController>()) {
|
||||
// Get.put(EntryController());
|
||||
//}
|
||||
//_entryController = Get.find<EntryController>();
|
||||
|
||||
await loadInitialData();
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user