get_settings

Last updated:

0 purchases

get_settings Image
get_settings Images
Add to Cart

Description:

get settings

Get Settings #

Toolbox, some useful methods, not commonly used but indispensable
Support #



Method
IOS Support
Android Support




getPlatformVersion




isiOSAppOnMac




getUserAgent




isRotationOn




getCPUType




isPad




ipodToPath




contentToPath





Usage #
import 'package:get_settings/getsettings.dart';
final setting = GetSettings();

copied to clipboard
Uri to file #
Use on_audio_query to obtain the uri of the audio file. This method can obtain the absolute path of the file.

content:// to filepath , app cache dir, Android Only.
ipod-library to filepath, app document dir, IOS Only.

Android:


Future<String> ipodPath = await setting.ipodToPath('ipod-library://item/item.mp3?id=6894390456987001162');
print(ipodPath);

Future<String> contentPath = await setting.contentToPath('content://media/external/audio/media/1000000346');
print(ipodpath);
copied to clipboard
Rotation On #
Android Only
setting.onListenSettings((rotation) {
print(rotation);
}, (onError) {
print('error:$onError');
});
Future<bool?> isRotationOn =await setting.isRotationOn();
copied to clipboard
Platform Version #
Future<String?> getPlatformVersion =await setting.getPlatformVersion();
print(getPlatformVersion);
copied to clipboard
iOS App On Mac #
Particularly useful for detecting whether an app is running on macOS, IOS Only
Future<bool?> isiOSAppOnMac =await setting.isiOSAppOnMac();
print(isiOSAppOnMac);
copied to clipboard
User Agent #
webview UserAgent
Future<String?> getUserAgent =await setting.getUserAgent();
print(getUserAgent);
copied to clipboard
CPU type #
IOS Only
Future<String?> getCPUType =await setting.getCPUType();
print(getCPUType);
//ARM,ARM64,X86,X86_64
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.