Comments (9)
I solved the problem by wrapping my widget/Image which is to be shared with a Container and providing color to that container.
please find the answer with an example here
https://stackoverflow.com/questions/59169393/flutter-image-share-using-flutter-plugin-giving-me-a-blackend-screen/59405251#59405251
from esys-flutter-share.
@mnshaikna could you provide a small code sample which reproduces the issue? The description above is not enough to clear the things up.
from esys-flutter-share.
I face the same problem. When I use your example code:
final ByteData bytes = await rootBundle.load('assets/symbols/hand.png');
await WcFlutterShare.share(
sharePopupTitle: 'share faver',
fileName: 'share.png',
mimeType: 'image/png',
bytesOfFile: bytes.buffer.asUint8List());
and share that within an instagram message, all I get is a black image. Sharing the same image via Threema, the image is displayed perfectly fine. :)
from esys-flutter-share.
Even i am facing the same problem.
While sharing an image file with Uint8List format gives a blackened image.
I have already added the question to the Stack-Overflow
Can anyone suggest a workaround ?
@gisinator did your code is working now? Can you suggest a solution?
Thanks.
from esys-flutter-share.
@kaxp thanks your tip worked for me.
i also wrapped the container with a RepaintBoundary.
from esys-flutter-share.
you have to change your widget background color to white or any color not black
backgroundColor: Colors.white,
it works for me
from esys-flutter-share.
My app implements both dark and light themes. In dark theme, screenshot image appears as expected without including the white background container; but in light theme, screenshot image appears blackened. If I include the container with white background, the blackened screenshot switches between the themes --> screenshot image now appears okay in light theme and becomes blackened in dark theme.
My work around is to check the current theme and use Colors.transparent for dark theme and Colors.white for light theme as below. This works in whatever theme mode.
Screenshot(
controller: screenshotController,
child: Container(
color: isDarkModeEnabled
? Colors.transparent
: Colors.white,
child: WidgetToBeShared(),
)
)
from esys-flutter-share.
I am trying to share the image which is in Uint8List format.
The image is basically a white container with a black text in it.
But when the Image is shared, the background somehow becomes black and the image is not visible as the text is already black.
Any Suggestions
from esys-flutter-share.
you have to change your widget background color to white or any color not black
backgroundColor: Colors.white, it works for me
not working
from esys-flutter-share.
Related Issues (20)
- Wrong mimeType when sharing single File HOT 1
- Return result after the share action is completed.
- Share image with text and subject not working HOT 1
- App crashes on IOS if the root view controller is not FlutterViewController
- My path on rootBundle, just it works after Hot Reload be triggered( Android Studio) HOT 1
- Share image byte showing error in logs HOT 1
- How do I add "Save image to device"?
- How to directly open whatsapp? and particular selected number Is that possible? HOT 3
- Text is not shown when sharing image on facebook or instagram HOT 4
- esys_flutter_share text to whatsapp failed HOT 3
- Deprecated API HOT 1
- Send Single time Text with Images on WhatsApp. HOT 2
- No apps can perorm this action HOT 1
- Error while sharing in iPad HOT 4
- Null Safety Support HOT 13
- Dependency path_provider HOT 8
- Using deprecated api HOT 2
- Please upgrade the version for path_provider to the latest version HOT 3
- The plugins `esys_flutter_share` use a deprecated version of the Android embedding. HOT 2
- java.lang.SecurityException: Permission Denial: reading de.esys.esysfluttershare.EsysFlutterShareFileProvider uri content HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esys-flutter-share.