I have the problem, that Image.network shows an Image rotated in the webapp. But if I open the same url in a browser, the orientation is correct.
Can somebody help me?
My Code:
import 'package:flutter/material.dart';
import 'package:firebase/firebase.dart' as fb;
import 'dart:js' as js;
class NetworkImageError extends StatefulWidget {
@override
_NetworkImageErrorState createState() => _NetworkImageErrorState();
}
class _NetworkImageErrorState extends State<NetworkImageError> {
String DownloadUrl='https://upload.wikimedia.org/wikipedia/commons/a/ad/Placeholder_no_text.svg'; //Placeholder
GetURL()async{
var _DownloadURL = await fb
.storage()
.refFromURL('gs://myBucket')
.child('Pb_0000.png')
.getDownloadURL();
setState(() {
DownloadUrl=_DownloadURL.toString();
});
}
@override
void initState(){
GetURL();
super.initState();
}
@override
Widget build(BuildContext context) {
return Container(
child: Center(
child: GestureDetector(
onTap: (){
js.context.callMethod("open", [DownloadUrl]);
},
child: Image.network(DownloadUrl)),
),
);
}
}
Aucun commentaire:
Enregistrer un commentaire