Jonny Borges

cleanup

1 import 'package:flutter/material.dart'; 1 import 'package:flutter/material.dart';
2 import 'package:get/get.dart'; 2 import 'package:get/get.dart';
3 3
4 -import '../../../../main.dart';  
5 import '../../../routes/app_pages.dart'; 4 import '../../../routes/app_pages.dart';
6 import '../controllers/home_controller.dart'; 5 import '../controllers/home_controller.dart';
7 6
@@ -9,8 +8,6 @@ class HomeView extends GetView<HomeController> { @@ -9,8 +8,6 @@ class HomeView extends GetView<HomeController> {
9 const HomeView({Key? key}) : super(key: key); 8 const HomeView({Key? key}) : super(key: key);
10 @override 9 @override
11 Widget build(BuildContext context) { 10 Widget build(BuildContext context) {
12 - final value = Get.find<Controller>();  
13 - print(value);  
14 return GetRouterOutlet.builder( 11 return GetRouterOutlet.builder(
15 routerDelegate: Get.nestedKey(Routes.home), 12 routerDelegate: Get.nestedKey(Routes.home),
16 builder: (context) { 13 builder: (context) {
@@ -5,7 +5,6 @@ import '../controllers/product_details_controller.dart'; @@ -5,7 +5,6 @@ import '../controllers/product_details_controller.dart';
5 class ProductDetailsBinding extends Binding { 5 class ProductDetailsBinding extends Binding {
6 @override 6 @override
7 List<Bind> dependencies() { 7 List<Bind> dependencies() {
8 - print('JDISOJDOSIJOI');  
9 return [ 8 return [
10 Bind.create<ProductDetailsController>( 9 Bind.create<ProductDetailsController>(
11 (_) => ProductDetailsController( 10 (_) => ProductDetailsController(
@@ -5,16 +5,11 @@ import 'package:get/get.dart'; @@ -5,16 +5,11 @@ import 'package:get/get.dart';
5 import 'app/modules/splash/controllers/splash_service.dart'; 5 import 'app/modules/splash/controllers/splash_service.dart';
6 import 'app/routes/app_pages.dart'; 6 import 'app/routes/app_pages.dart';
7 7
8 -class Controller {}  
9 -  
10 void main() { 8 void main() {
11 runApp( 9 runApp(
12 GetMaterialApp( 10 GetMaterialApp(
13 title: "Application", 11 title: "Application",
14 binds: [ 12 binds: [
15 - Bind.create<Controller>(  
16 - (_) => Controller(),  
17 - ),  
18 Bind.put(SplashService()), 13 Bind.put(SplashService()),
19 Bind.put(AuthService()), 14 Bind.put(AuthService()),
20 ], 15 ],
@@ -74,19 +74,13 @@ class _GetCache<S extends GetLifeCycleMixin> extends WidgetCache<GetWidget<S>> { @@ -74,19 +74,13 @@ class _GetCache<S extends GetLifeCycleMixin> extends WidgetCache<GetWidget<S>> {
74 void onInit() { 74 void onInit() {
75 info = Get.getInstanceInfo<S>(tag: widget!.tag); 75 info = Get.getInstanceInfo<S>(tag: widget!.tag);
76 76
77 - print('info: $info');  
78 -  
79 _isCreator = info!.isPrepared && info!.isCreate; 77 _isCreator = info!.isPrepared && info!.isCreate;
80 78
81 if (info!.isRegistered) { 79 if (info!.isRegistered) {
82 _controller = Get.find<S>(tag: widget!.tag); 80 _controller = Get.find<S>(tag: widget!.tag);
83 } 81 }
84 82
85 - print('controller: $_controller');  
86 - print('widget: $widget');  
87 -  
88 GetWidget._cache[widget!] = _controller; 83 GetWidget._cache[widget!] = _controller;
89 - print('cache: ${GetWidget._cache}');  
90 84
91 super.onInit(); 85 super.onInit();
92 } 86 }