-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(#65): Adiciona DI e reorganiza pastas para receber api.
- Loading branch information
1 parent
3966cff
commit f598509
Showing
8 changed files
with
42 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import 'package:aranduapp/ui/trails/service/trails_service.dart'; | ||
import 'package:aranduapp/ui/trails/viewmodel/trails_viewmodel.dart'; | ||
import 'package:get_it/get_it.dart'; | ||
|
||
final GetIt locator = GetIt.instance; | ||
|
||
void setupTrailsDI() { | ||
locator.registerLazySingleton(() => TrailsService()); | ||
|
||
locator.registerFactory(() => TrailsViewmodel()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import 'dart:convert'; | ||
|
||
class TrailsRequest {} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import 'package:aranduapp/core/network/auth_api.dart'; | ||
import 'package:aranduapp/ui/trails/model/trails_request.dart'; | ||
|
||
class TrailsService { | ||
Future<void> edit(TrailsRequest editProfileRequest) async { | ||
//await AuthApi.getInstance(auth: true) | ||
//.patch(path: '/users', data: editProfileRequest.toJson()); Não queremos isso! | ||
} | ||
} |
File renamed without changes.
8 changes: 4 additions & 4 deletions
8
lib/ui/access_trails/view/access_trails.dart → lib/ui/trails/view/trails_view.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import 'package:aranduapp/core/network/token_manager/model/user_model.dart'; | ||
import 'package:aranduapp/core/network/token_manager/repository/auth_repository.dart'; | ||
import 'package:aranduapp/core/state/command.dart'; | ||
//import 'package:aranduapp/ui/trails/model/trails_request.dart'; | ||
//import 'package:aranduapp/ui/trails/service/trails_service.dart'; | ||
import 'package:async/async.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:get_it/get_it.dart'; | ||
|
||
class TrailsViewmodel extends ChangeNotifier { | ||
late Command1<void, TrailsViewmodel> editCommand; | ||
late Command0<UserModel> getUserCommand; | ||
} |