Double is a double-precision 8 byte floating-point type with an approximate range of 2.3E-308 to 1.7E+308.
The default value of a Double is 0.0. You can change the default value of the property by assigning a new value in an overridden method.
double is a double-precision 8 byte floating-point type with an approximate range of 2.3E-308 to 1.7E+308.
The default value of a double is 0.0. You can change the default value of the property by assigning a new value in an overridden method.
The flutter class defers to the underlying platform (iOS) or (Android) subclass to read property values.
The React Native module AppfigurateModule class defers to the underlying platform (iOS) or (Android) subclass to read property values.
React Native always converts the underlying Double to a JavaScript Number - you should be aware of .
Local properties
Slider UI
Allows a double property to be changed in Appfigurate using a slider between minimum and maximum values.
Swift prototype
@DoublePropertySlider(min, max, icon, description, restart)
var propertyName: Double
You can customize the minimum and maximum images using the parameter. If restart is true, then the app will be restarted if the property value changes.
import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.DoublePropertySlider;
import nz.co.electricbolt.appfiguratelibrary.annotations.IconSlider;
public class AppConfiguration extends Configuration {
@DoublePropertySlider(minValue = 60.5, max = 120.41, sliderIcon = IconSlider.IconSliderVolume, description = "Clipping - decibels", restart = false)
public double maxDecibel;
@Override
public void reset() {
super.reset();
this.maxDecibel = 100.0;
}
...
Dart prototype
double get propertyName => nativeDouble('propertyName');
Dart example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
double get maxDecibel => nativeDouble('maxDecibel');
...
JavaScript example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let maxDecibel = await Appfigurate.nativeValue("maxDecibel"); // Number
Editable UI
Allows a double property to be changed in Appfigurate using a text field between minimum and maximum values, and an optional regular expression validating input.
Swift prototype
@DoublePropertyEdit(min, max, regex, description, restart)
var propertyName: Double
If restart is true, then the app will be restarted if the property value changes.
If restart is true, then the app will be restarted if the property value changes.
Java example
import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.DoublePropertyEdit;
public class AppConfiguration extends Configuration {
@DoublePropertyEdit(description = "Shot accuracy", minValue = -2.1, maxValue = 4.1, regularExpression = "", restart = false)
public double shotAccuracy;
@Override
public void reset() {
super.reset();
this.shotAccuracy = 3.241;
}
...
Dart prototype
double get propertyName => nativeDouble('propertyName');
Dart example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
double get shotAccuracy => nativeDouble('shotAccuracy');
...
JavaScript example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let shotAccuracy = await Appfigurate.nativeValue("shotAccuracy"); // Number
List UI
Allows a double property to be changed in Appfigurate by allowing the user to select from a predefined list of valid choices.
Swift prototype
@DoublePropertyList(description, restart, values)
var propertyName: Double
If restart is true, then the app will be restarted if the property value changes.
double get propertyName => nativeDouble('propertyName');
Dart example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
double get rating => nativeDouble('rating');
...
JavaScript example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let rating = await Appfigurate.nativeValue("rating"); // Number
Editable List UI
Allows a double property to be changed in Appfigurate by allowing the user to select from a predefined list of valid choices. The user can customize the list adding by additional values using a text field between minimum and maximum values, and an optional regular expression validating input.
Swift prototype
@DoublePropertyListEdit(min, max, regex, description, restart, values)
var propertyName: Double
If restart is true, then the app will be restarted if the property value changes.
If restart is true, then the app will be restarted if the property value changes.
Java example
import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.DoublePropertyListEdit;
public class AppConfiguration extends Configuration {
@DoublePropertyListEdit(description = "Forward server time (days)", minValue = 0.0, maxValue = 366.0, regularExpression = "^(0?[0-9]?[0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-5])$", keys = {"7 days", "1 month", "1 Year"}, values = {7.0, 30.0, 365.0}, restart = false)
public double forwardServerTime;
@Override
public void reset() {
super.reset();
this.forwardServerTime = 7.0;
}
...
Dart prototype
double get propertyName => nativeDouble('propertyName');
Dart example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
double get forwardServerTime => nativeDouble('forwardServerTime');
...
JavaScript example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let forwardServerTime = await Appfigurate.nativeValue("forwardServerTime"); // Number
Remote properties
Remote Editable UI
Third party remote configuration provider integration is currently in private beta and will be available in the next major release of Appfigurate.
Allows a third party remote configuration provider's double property to be changed locally in Appfigurate using a text field. If the override tick box is ticked off, the third party remote configuration provider's value is displayed. If the override tick box is ticked on, then you can use Appfigurate to locally override the value.
Swift prototype
@RemoteDoublePropertyEdit(remoteKey, description, restart)
var propertyName: Double
Swift example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@RemoteDoublePropertyEdit(remoteKey: "fontSize", description: "Size of font throughout app")
var fontSize: Double
override func reset() {
fontSize = 13.0
}
...
import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.RemoteDoublePropertyEdit;
public class AppConfiguration extends Configuration {
@RemoteDoublePropertyEdit(remoteKey = "fontSize", description = "Size of font throughout app")
public double fontSize;
@Override
public void reset() {
super.reset();
this.fontSize = 13.0;
}
...
Dart prototype
double get propertyName => nativeDouble('propertyName');
Dart example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
double get fontSize => nativeDouble('fontSize');
...
JavaScript example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let fontSize = await Appfigurate.nativeValue("fontSize"); // Number
You can customize the minimum and maximum images using the parameter. If restart is true, then the app will be restarted if the property value changes.
You can customize the minimum and maximum images using the parameter. If restart is true, then the app will be restarted if the property value changes.