getProducts method
Implementation
@override
Future<List<Product>> getProducts() async {
final result = await methodChannel.invokeMethod<String>('getProducts');
if (result == null) {
return [];
}
return parseListNotNull(
json: jsonDecode(escape(result)), fromJson: Product.fromJson);
}