getData method

  1. @override
Future<String> getData(
  1. String query
)
override

Retrieves data from the database using the specified SQL query.

Implementation

@override
Future<String> getData(String query) async {
  try {
    final result =
        await methodChannel.invokeMethod<List>('getData', {'query': query});
    return result == null ? "" : "[${result.join(",")}]";
  } catch (e) {
    rethrow;
  }
}