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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Flutter dev", | |
"request": "launch", | |
"type": "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
import 'package:app/data/storage/auth/auth_shared_references.dart'; | |
import 'package:app/domain/repository/auth_repo.dart'; | |
import 'package:app/domain/repository/logging_repo.dart'; | |
import 'package:dio/dio.dart'; | |
import 'package:kiwi/kiwi.dart'; | |
//#1 | |
const String KEY_LOGGED_HEADER = "isLogged"; | |
class AuthenticationInterceptor extends Interceptor{ |
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
import 'package:app/data/storage/auth/auth_shared_references.dart'; | |
import 'package:app/domain/repository/auth_repo.dart'; | |
import 'package:app/domain/repository/logging_repo.dart'; | |
import 'package:dio/dio.dart'; | |
import 'package:kiwi/kiwi.dart'; | |
//#1 | |
const String KEY_LOGGED_HEADER = "isLogged"; | |
class AuthenticationInterceptor extends Interceptor{ |
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
@GET('Search/Deals') | |
@Http.Headers(<String, dynamic>{KEY_LOGGED_HEADER: "true"}) | |
Future<SearchDealsResp> searchDealsByCompany( | |
@Query("itemsPerPage") int itemsPerPage, | |
@Query("pageIndex") int pageIndex, | |
@Query("companyId") int companyId, | |
@Queries() Map<String, dynamic> queries); | |
@GET('Deals/productCategories') | |
Future<CategoryResp> productCategoriesInCompany(@Query("supplierId") int supplierId); |
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
import 'package:app/data/storage/auth/auth_shared_references.dart'; | |
import 'package:app/domain/repository/auth_repo.dart'; | |
import 'package:dio/dio.dart'; | |
import 'package:kiwi/kiwi.dart'; | |
class AuthenticationInterceptor extends Interceptor{ | |
final Dio _dio; | |
AuthenticationInterceptor(this._dio); | |
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
import 'package:app/data/storage/auth/auth_shared_references.dart'; | |
import 'package:dio/dio.dart'; | |
import 'package:kiwi/kiwi.dart'; | |
class AuthenticationInterceptor extends Interceptor{ | |
AuthSharedPreferences _authSharedPreferences = KiwiContainer().resolve<AuthSharedPreferences>(); | |
@override | |
Future onRequest(RequestOptions options) async { |
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
import 'package:dio/dio.dart'; | |
class AuthenticationInterceptor extends Interceptor{ | |
@override | |
Future onRequest(RequestOptions options) { | |
return super.onRequest(options); | |
} | |
@override |
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
import 'package:flutter/material.dart'; | |
import 'package:provider/provider.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override |
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
import 'package:flutter/material.dart'; | |
import 'package:provider/provider.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override |
NewerOlder