NetworkApi class
Network CRUD and management.
Constructors
- NetworkApi(Transport _conn)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
create(
{required String type, required String chainId, required String name, String? rpc, required String currencySymbol, String? blockExplorer, bool testNet = false, int priority = 0}) → Future< Network> - Add a new network.
-
delete(
String id) → Future< void> - Delete a network.
-
get(
String id) → Future< Network> -
Get a network by ID. Use
"@"for the current network. -
getCurrent(
) → Future< Network> - Get the current network.
-
list(
{bool? testNet}) → Future< List< Network> > - List all networks. Optionally exclude testnets.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setCurrent(
String id) → Future< void> - Set a network as the current network.
-
testRpc(
String url, {String type = 'evm'}) → Future< RpcTestResult> - Probe an RPC endpoint and return a structured health snapshot.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
String id, {String? name, String? rpc, String? currencySymbol, int? currencyDecimals, String? blockExplorer, bool? testNet, int? priority}) → Future< Network> - Update a network. Only non-null fields are sent.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited