Preview:
import 'package:smart_contract_client/smart_contract_client.dart';
import 'package:smart_contract_repository/smart_contract_repository.dart';

class SmartContractRepository {
  const SmartContractRepository({required SmartContractClient client})
      : _client = client;

  final SmartContractClient _client;

  Future<String> getName() async {
    try {
      return _client.getName();
    } catch (e) {
      throw SmartContractRepositoryException(e);
    }
  }

  Future<String> setName({required String name}) async {
    try {
      return _client.setName(name: name);
    } catch (e) {
      throw SmartContractRepositoryException(e);
    }
  }
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter