This file contains hidden or 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 'dart:async'; | |
import 'package:dio/dio.dart'; | |
import 'package:dio_cache_interceptor/dio_cache_interceptor.dart'; | |
// Exceptions | |
import './custom_exception.dart'; | |
// Helpers | |
import '../../helpers/typedefs.dart'; |
This file contains hidden or 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
// ignore_for_file: constant_identifier_names | |
import 'package:dio/dio.dart'; | |
import 'package:flutter/foundation.dart'; | |
/// An enum that holds names for our custom exceptions. | |
enum _ExceptionType { | |
/// The exception for an expired bearer token. | |
TokenExpiredException, | |
/// The exception for a prematurely cancelled request. |
This file contains hidden or 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
// Helpers | |
import '../../helpers/constants/app_utils.dart'; | |
import '../../helpers/typedefs.dart'; | |
class ResponseModel<T> { | |
final _ResponseHeadersModel headers; | |
final T body; | |
const ResponseModel({ | |
required this.headers, |
This file contains hidden or 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
// ignore_for_file: constant_identifier_names | |
// DO NOT USE 'dartfmt' on this file for formatting | |
import 'package:flutter/material.dart'; | |
// Config | |
import '../../config/config.dart'; | |
/// A utility class for getting paths for API endpoints. | |
/// This class has no constructor and all methods are `static`. |
This file contains hidden or 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'; | |
import 'package:dio_cache_interceptor/dio_cache_interceptor.dart'; | |
// Exceptions | |
import './custom_exception.dart'; | |
// Services | |
import './api_interface.dart'; | |
import './dio_service.dart'; |
This file contains hidden or 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'; | |
import 'package:flutter_riverpod/flutter_riverpod.dart'; | |
// Providers | |
import '../../../features/all_providers.dart'; | |
/// A class that holds intercepting logic for API related requests. This is | |
/// the first interceptor in case of both request and response. | |
/// | |
/// Primary purpose is to handle token injection and response success validation |
This file contains hidden or 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 'dart:io'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:dio/dio.dart'; | |
//helpers | |
import '../../../helpers/typedefs.dart'; | |
/// A class that intercepts network requests for logging purposes only. This is | |
/// the second interceptor in case of both request and response. |
This file contains hidden or 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
// ignore_for_file: deprecated_member_use | |
import 'package:dio/dio.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter_riverpod/flutter_riverpod.dart'; | |
// Providers | |
import '../../../features/all_providers.dart'; | |
import '../../../features/auth/providers/auth_provider.dart'; |
This file contains hidden or 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/gestures.dart'; | |
import 'package:flutter/material.dart'; | |
// Helpers | |
import '../../helpers/constants/constants.dart'; | |
import '../../helpers/extensions/extensions.dart'; | |
class CustomText extends StatelessWidget { | |
final String text; | |
final TextAlign? textAlign; |
This file contains hidden or 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:hooks_riverpod/hooks_riverpod.dart'; | |
import 'package:lottie/lottie.dart'; | |
import 'package:purchases_ui_flutter/purchases_ui_flutter.dart'; | |
// Config | |
import '../../../config/config.dart'; | |
// Helpers | |
import '../../../helpers/constants/constants.dart'; |
OlderNewer