memberGet method
Fetch a member by the varName
, in the form of
object.varName
varName
must be of String type.
Implementation
@override
dynamic memberGet(String varName, {String? from}) {
switch (varName) {
case 'BigInt.zero':
return (HTEntity entity,
{List<dynamic> positionalArgs = const [],
Map<String, dynamic> namedArgs = const {},
List<HTType> typeArgs = const []}) =>
BigInt.zero;
case 'BigInt.one':
return (HTEntity entity,
{List<dynamic> positionalArgs = const [],
Map<String, dynamic> namedArgs = const {},
List<HTType> typeArgs = const []}) =>
BigInt.one;
case 'BigInt.two':
return (HTEntity entity,
{List<dynamic> positionalArgs = const [],
Map<String, dynamic> namedArgs = const {},
List<HTType> typeArgs = const []}) =>
BigInt.two;
case 'BigInt.parse':
return (HTEntity entity,
{List<dynamic> positionalArgs = const [],
Map<String, dynamic> namedArgs = const {},
List<HTType> typeArgs = const []}) =>
BigInt.tryParse(positionalArgs.first, radix: namedArgs['radix']);
case 'BigInt.from':
return (HTEntity entity,
{List<dynamic> positionalArgs = const [],
Map<String, dynamic> namedArgs = const {},
List<HTType> typeArgs = const []}) =>
BigInt.from(positionalArgs.first);
default:
throw HTError.undefined(varName);
}
}