main function

void main()

Implementation

void main() async {
  // Replace 'YOUR_ACCESS_TOKEN' with your actual access token
  String accessToken = 'YOUR_ACCESS_TOKEN';

  // Initialize GoogleDrive instance
  GoogleDrive gDrive = GoogleDrive(authToken: accessToken);

  // List files in Google Drive
  try {
    Map fileList = await gDrive.listFiles();
    print('Files: $fileList');
  } catch (e) {
    print('Error: $e');
  }

  // Get detailed information about a specific file
  try {
    String fileId = 'YOUR_FILE_ID';
    Map fileInfo = await gDrive.getFile(fileId: fileId);
    print('File Info: $fileInfo');
  } catch (e) {
    print('Error: $e');
  }
}