Mayya Core
A Flutter plugin that provides core functionality for secure data handling, encryption, and device information management. This plugin is designed to make it easy to implement secure data storage, encryption, and device-specific operations in your Flutter applications.
Features
- π Secure data storage using flutter_secure_storage
- π Data encryption and decryption utilities
- π± Device information retrieval
- π Network request handling with Dio
- π¦ Package information management
- π Detailed logging with PrettyDioLogger
Getting started
Add this to your package's pubspec.yaml
file:
dependencies:
mayya_core: ^0.0.1
You'll also need to add the following permissions to your app:
Android
Add the following permissions to your android/app/src/main/AndroidManifest.xml
:
<uses-permission android:name="android.permission.INTERNET"/>
iOS
Add the following to your ios/Runner/Info.plist
:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Usage
Secure Storage
import 'package:mayya_core/mayya_core.dart';
// Store secure data
await MayyaCore.storeSecureData('key', 'value');
// Retrieve secure data
String? value = await MayyaCore.getSecureData('key');
Encryption
import 'package:mayya_core/mayya_core.dart';
// Encrypt data
String encrypted = await MayyaCore.encryptData('sensitive data');
// Decrypt data
String decrypted = await MayyaCore.decryptData(encrypted);
Device Information
import 'package:mayya_core/mayya_core.dart';
// Get device information
Map<String, dynamic> deviceInfo = await MayyaCore.getDeviceInfo();
Additional information
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Issues and Feedback
Please file issues and feature requests on the GitHub repository.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Libraries
- config/constants
- core/core_exceptions
- core/dio_client
- core/models/errors/backend_error
- core/models/errors/client_error
- core/models/errors/ecto_changeset_error
- core/models/errors/errors
- core/models/errors/server_error
- core/models/errors/validation_error
- core/models/internal/api/fetch_resource_form_data
- core/models/internal/api/fetch_resource_response
- core/models/internal/api/flush_analytics_form_data
- core/models/internal/api/media_request
- core/models/internal/api/refresh_session_form_data
- core/models/internal/api/refresh_session_response
- core/models/internal/api/register_player_session_form_data
- core/models/internal/api/register_player_session_response
- core/models/internal/api/request_media_session_form_data
- core/models/internal/device_model
- core/models/internal/session_model
- core/models/models
- core/models/output/media_playback_model
- core/models/output/playback_url_model
- core/models/output/resource/config
- core/models/output/resource/image_model
- core/models/output/resource/resource_model
- core/models/output/resource/stream_model
- core/models/output/resource/vod_model
- core/sources/api_source
- core/sources/sources
- core/sources/storage_source
- core/utils
- core/utils/backend_error_parser
- core/utils/logger
- mayya_core