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

File dependency conflict #33

Open
akadatsky opened this issue Jun 1, 2021 · 1 comment
Open

File dependency conflict #33

akadatsky opened this issue Jun 1, 2021 · 1 comment

Comments

@akadatsky
Copy link
Contributor

We have an issue with latest version of Flutter:

import 'dart:io';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';

flutter_cache_manager overrides dart:io, cause in flutter_cache_manager declared:
export 'package:file/file.dart' show File;

Look at this for details:
Baseflow/flutter_cache_manager#320

This could be fixed by:

import 'package:flutter_cache_manager/flutter_cache_manager.dart' as fcm;

  Future<void> loadNetworkPDF() async {
    final fetchedFile =
        await fcm.DefaultCacheManager().getSingleFile(widget.networkURL!);
    await (writeCounter(fetchedFile.readAsBytesSync()));
    path = (await _localFile).path;
  }

Could you please fix it?

@ksokolovskyi
Copy link

@akadatsky Check this PR, it is working.
#34

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

No branches or pull requests

2 participants