shoes_sdk.dart 578 B

1234567891011121314151617181920212223
  1. import 'dart:async';
  2. import 'dart:ffi';
  3. import 'dart:io';
  4. import 'package:ffi/ffi.dart';
  5. import 'package:flutter/services.dart';
  6. import 'generated_bindings.dart';
  7. Pointer<Int32> int32ListToArrayPointer(List<int> list) {
  8. final ptr = calloc<Int32>(list.length);
  9. ptr.asTypedList(list.length).setAll(0, list);
  10. return ptr;
  11. }
  12. class ShoesSdk {
  13. static const MethodChannel _channel = const MethodChannel('shoes_sdk');
  14. static Future<String> get platformVersion async {
  15. final String version = await _channel.invokeMethod('getPlatformVersion');
  16. return version;
  17. }
  18. }