Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added image download functionality #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bimsina
Copy link

@bimsina bimsina commented Dec 21, 2019

No description provided.

@divyanshub024
Copy link
Owner

Getting these messages while running your branch.

Compiler message:
Error: Could not resolve the package 'image_downloader' in 'package:image_downloader/image_downloader.dart'.
Error: Could not resolve the package 'permission_handler' in 'package:permission_handler/permission_handler.dart'.
lib/screens/image_page.dart:7:8: Error: Not found: 'package:image_downloader/image_downloader.dart'
import 'package:image_downloader/image_downloader.dart';
       ^
lib/screens/image_page.dart:8:8: Error: Not found: 'package:permission_handler/permission_handler.dart'
import 'package:permission_handler/permission_handler.dart';
       ^
lib/screens/image_page.dart:267:7: Error: 'PermissionStatus' isn't a type.
      PermissionStatus status = await PermissionHandler()
      ^^^^^^^^^^^^^^^^
lib/screens/image_page.dart:267:39: Error: The method 'PermissionHandler' isn't defined for the class '_ImagePageState'.
 - '_ImagePageState' is from 'package:chitr/screens/image_page.dart' ('lib/screens/image_page.dart').
Try correcting the name to the name of an existing method, or defining a method named 'PermissionHandler'.
      PermissionStatus status = await PermissionHandler()
                                      ^^^^^^^^^^^^^^^^^
lib/screens/image_page.dart:268:34: Error: The getter 'PermissionGroup' isn't defined for the class '_ImagePageState'.
 - '_ImagePageState' is from 'package:chitr/screens/image_page.dart' ('lib/screens/image_page.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'PermissionGroup'.
          .checkPermissionStatus(PermissionGroup.storage);
                                 ^^^^^^^^^^^^^^^
lib/screens/image_page.dart:270:21: Error: The getter 'PermissionStatus' isn't defined for the class '_ImagePageState'.
 - '_ImagePageState' is from 'package:chitr/screens/image_page.dart' ('lib/screens/image_page.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'PermissionStatus'.
      if (status == PermissionStatus.granted) {
                    ^^^^^^^^^^^^^^^^
lib/screens/image_page.dart:274:31: Error: The getter 'ImageDownloader' isn't defined for the class '_ImagePageState'.
 - '_ImagePageState' is from 'package:chitr/screens/image_page.dart' ('lib/screens/image_page.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'ImageDownloader'.
          var imageId = await ImageDownloader.downloadImage(
                              ^^^^^^^^^^^^^^^
lib/screens/image_page.dart:276:28: Error: The getter 'AndroidDestinationType' isn't defined for the class '_ImagePageState'.
 - '_ImagePageState' is from 'package:chitr/screens/image_page.dart' ('lib/screens/image_page.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'AndroidDestinationType'.
              destination: AndroidDestinationType.directoryDownloads);
                           ^^^^^^^^^^^^^^^^^^^^^^
lib/screens/image_page.dart:293:5: Error: 'PermissionStatus' isn't a type.
    PermissionStatus status = await PermissionHandler()
    ^^^^^^^^^^^^^^^^
lib/screens/image_page.dart:292:11: Error: The method 'PermissionHandler' isn't defined for the class '_ImagePageState'.
 - '_ImagePageState' is from 'package:chitr/screens/image_page.dart' ('lib/screens/image_page.dart').
Try correcting the name to the name of an existing method, or defining a method named 'PermissionHandler'.
    await PermissionHandler().requestPermissions([PermissionGroup.storage]);
          ^^^^^^^^^^^^^^^^^
lib/screens/image_page.dart:292:51: Error: The getter 'PermissionGroup' isn't defined for the class '_ImagePageState'.
 - '_ImagePageState' is from 'package:chitr/screens/image_page.dart' ('lib/screens/image_page.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'PermissionGroup'.
    await PermissionHandler().requestPermissions([PermissionGroup.storage]);
                                                  ^^^^^^^^^^^^^^^
lib/screens/image_page.dart:293:37: Error: The method 'PermissionHandler' isn't defined for the class '_ImagePageState'.
 - '_ImagePageState' is from 'package:chitr/screens/image_page.dart' ('lib/screens/image_page.dart').
Try correcting the name to the name of an existing method, or defining a method named 'PermissionHandler'.
    PermissionStatus status = await PermissionHandler()
                                    ^^^^^^^^^^^^^^^^^
lib/screens/image_page.dart:294:32: Error: The getter 'PermissionGroup' isn't defined for the class '_ImagePageState'.
 - '_ImagePageState' is from 'package:chitr/screens/image_page.dart' ('lib/screens/image_page.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'PermissionGroup'.
        .checkPermissionStatus(PermissionGroup.storage);
                               ^^^^^^^^^^^^^^^
lib/screens/image_page.dart:295:19: Error: The getter 'PermissionStatus' isn't defined for the class '_ImagePageState'.
 - '_ImagePageState' is from 'package:chitr/screens/image_page.dart' ('lib/screens/image_page.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'PermissionStatus'.
    if (status == PermissionStatus.granted) {

@divyanshub024
Copy link
Owner

Sorry, the issue was with my compiler. Ignore the above message.

@divyanshub024
Copy link
Owner

When I click on download button it shows me Toast that "Check notification to see progress" but there is no notification.

@bimsina
Copy link
Author

bimsina commented Dec 29, 2019

Are you running on emulator or real device? It works fine on the devices I have tested. I have implemented the same download module here : https://github.com/bimsina/reWalls .

@divyanshub024
Copy link
Owner

@bimsina I was running on the real device. Although after a couple of hours I got all those notifications. Let me check why That was happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants