MotorFlutter class Null safety Start Here

MotorFlutter

This is the main class for the MotorFlutter package. Create a new MotorFlutter instance by calling the MotorFlutter.init method in your main method.

Resources

Inheritance
Available Extensions

Constructors

MotorFlutter()

Properties

address RxString
Reactive variable that holds the current active MotorFlutter wallet address.
final
authorized RxBool
Sets itself to true when the MotorFlutter account is created with createAccount, or login. This is used to determine if the user is ready to be active on the Sonr Network or not.
final
balance RxInt
Returns the current active account's liquid SNR balance. This variable is triggered to refresh on the refresh method.
final
connected RxBool
Sets itself to true when the MotorFlutter account is finished bootstrapping to the Sonr Network. The connect method triggers the refresh of this variable.
final
didDocument Rx<DIDDocument>
Returns the curret active account's DIDDocument. This value is set on account authorization, and can be refreshed with the refresh method.
final
didUrl String
This getter method returns the current version of the underlying accounts DIDDocument id. This is NOT a reactive variable.
read-only
discoverEvents StreamController<RefreshEvent>
A Stream of all RefreshEvent that are transmitted in the Local Discovery OLC
final
domains RxList<Alias>
A list of .snr/ domains each mapped to Alias objects. These can be used to resolve associated aliases with a given Sonr account.
final
hashCode int
The hash code for this object.
read-only, inherited
initialized bool
Checks whether the controller has already been initialized.
read-only, inherited
isClosed bool
Checks whether the controller has already been closed.
read-only, inherited
nearbyPeers RxList<Peer>
List of all neerby Motor powered devices. This is updated every time a RefreshEvent is received on the MethodChannel. All nodes are referenced with the Peer object.
final
onDelete InternalFinalCallback<void>
Internal callback that starts the cycle of this controller.
final, inherited
onStart InternalFinalCallback<void>
Called at the exact moment the widget is allocated in memory. It uses an internal "callable" type, to avoid any @overrides in subclases. This method should be internal and is required to define the lifetime cycle of the subclass.
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
staked RxString
Returns the current accounts staked SNR balance. This variable is triggered to refresh on the refresh method.
final

Methods

$configureLifeCycle() → void
inherited
buyAlias(String alias, [ResponseCallback<MsgBuyAliasResponse>? callback]) Future<MsgBuyAliasResponse>
Purchasing a Subdomain
connect([ResponseCallback<bool>? callback]) Future<bool>
Connect to the Sonr Network
createAccount(String password, {Key? dscKey, Key? pskKey}) Future<AuthInfo>
Creating a New Account
createBucket(CreateBucketRequest req) Future<Bucket>
Create a Bucket On-Chain
findBucket({String? did, String? creator}) Future<List<Bucket>>
Find a Schema Definition
findSchemas({String? creator}) Future<List<SchemaDefinition>>
Find a Schema Definition
getDocument({required String cid}) Future<GetDocumentResponse>
Retreiving a Document
getSchema(String did) Future<SchemaDefinition?>
Search for a Schema Definition
login({required String password, required String address, List<int>? pskKey, List<int>? dscKey}) Future<WhoIs>
Logging In
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
onClose() → void
Called before onDelete method. onClose might be used to dispose resources used by the controller. Like closing events, or streams before the controller is destroyed. Or dispose objects that can potentially create some memory leaks, like TextEditingControllers, AnimationControllers. Might be useful as well to persist some data on disk.
override
onInit() → void
Called immediately after the widget is allocated in memory. You might use this to initialize something for the controller.
@mustCallSuper, inherited
onReady() → void
Called 1 frame after onInit(). It is the perfect place to enter navigation events, like snackbar, dialogs, or a new route, or async request.
inherited
publishSchema(String label, Map<String, SchemaKind> fields, {Map<String, String>? metadata}) Future<CreateSchemaResponse>
Publish a Schema Definition On-Chain
refresh([ResponseCallback<StatResponse>? callback]) Future<StatResponse>
Get Account Info
sellAlias(String alias, int amount, [ResponseCallback<MsgSellAliasResponse>? callback]) Future<MsgSellAliasResponse>
Listing a Subdomain for Auction
sendTokens(String recipient, int amount, {String? memo}) Future<PaymentResponse>
Sending Tokens
toString() String
A string representation of this object.
inherited
transferAlias(String alias, String currentOwner, int amount, [ResponseCallback<MsgTransferAliasResponse>? callback]) Future<MsgTransferAliasResponse>
Transferring a Subdomain
uploadDocument({required SchemaDocument doc, required String label}) Future<UploadDocumentResponse>
Upload a Document

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

isReady bool
Returns true if the MotorFlutter service has been injected into the GetX State Management system.
read-only
query QueryService
Use the static REST API Controller query in order to search for items on Chain.
read-only
to MotorFlutter
Use the static to getter method allows access to MotorFlutter instance anywhere in the application.
read-only

Static Methods

init({bool autoInject = true}) Future<void>
Initialization}