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: avoid_positional_boolean_parameters | |
import 'dart:convert'; | |
import 'package:hooks_riverpod/hooks_riverpod.dart'; | |
// Services | |
import '../../features/notifications/notifications.dart'; | |
import '../networking/models/token_model.codegen.dart'; | |
import 'key_value_storage_base.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 'dart:async'; | |
import 'package:flutter/services.dart'; | |
import 'package:shared_preferences/shared_preferences.dart'; | |
import 'package:flutter_secure_storage/flutter_secure_storage.dart'; | |
import '../../config/logging/logging.dart'; | |
/// Base class containing a unified API for key-value pairs' storage. | |
/// This class provides low level methods for storing: |
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'; | |
// Networking | |
import '../networking/networking.dart'; | |
// Monitoring | |
import 'analytics_client_base.dart'; | |
class ServerAnalyticsClient implements AnalyticsClientBase { | |
final ApiService _apiService; |
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:posthog_flutter/posthog_flutter.dart'; | |
// Monitoring | |
import 'analytics_client_base.dart'; | |
class PosthogAnalyticsClient implements AnalyticsClientBase { | |
static final Posthog _posthog = Posthog(); | |
const PosthogAnalyticsClient(); |
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'; | |
// Config | |
import '../../config/config.dart'; | |
// Monitoring | |
import 'analytics_client_base.dart'; | |
class LoggerAnalyticsClient implements AnalyticsClientBase { | |
const LoggerAnalyticsClient(); |
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
// Local | |
import '../../config/config.dart'; | |
import '../local/local.dart'; | |
// Analytics | |
import 'analytics_client_base.dart'; | |
import 'logger_analytics_client.dart'; | |
import 'posthog_analytics_client.dart'; | |
class AnalyticsService implements AnalyticsClientBase { |
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
abstract class AnalyticsClientBase { | |
/// Toggles the collection of analytics data. | |
Future<void> toggleAnalyticsCollection(bool enabled); | |
/// Identifies the user with the given [userId]. | |
Future<void> identifyUser({ | |
required String userId, | |
required String email, | |
required String role, | |
}); |
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:flutter/cupertino.dart'; | |
import 'package:flutter/services.dart'; | |
import 'package:flutter_secure_storage/flutter_secure_storage.dart'; | |
import 'package:shared_preferences/shared_preferences.dart'; | |
/// Base class containing a unified API for key-value pairs' storage. | |
/// This class provides low level methods for storing: | |
/// - Sensitive keys using [FlutterSecureStorage] |
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'; | |
// Helpers | |
import '../../helpers/constants/constants.dart'; | |
// Widgets | |
import 'custom_value_listener.dart'; | |
typedef OnChangedCallback<T> = void Function(T?); | |
typedef OnValidateCallback<T> = String? Function(T?)?; |
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'; |
NewerOlder