import 'package:flutter_web_ui/ui.dart' as ui;
import 'package:flutter_web_ui/src/engine.dart' as engine;
import 'package:flutter_gallery/main.dart' as app;
main() async {
await ui.webOnlyInitializePlatform();
engine.window.webOnlyLocationStrategy = const engine.HashLocationStrategy();
app.main();
}
Have something interesting that I can not figure out. I am doing an http get, it gets sent urlencoded and the rest api can not process it and I get a 401. I feel like I have tried everything to get it to send without encoding, but nothing works. Any ideas or thoughts on how to over come it. Here is the code basics.
String myurl = 'https://api.thousandeyes.com/v6/agents.json -u email@email.com:$apikey';
var client = http.Client();
if (mounted) {
setState(() {
_responseFuture = client.get(myurl);
});
}
I know I am missing something stupid probably related to the library I am using, but it works as a curl because it does not encode it. Any thoughts would be great.
Hey everyone, I'm building a little mini-game into my flutter web app and want to have a physics based ball that rolls from one side of a constrained box to another tied to mouse movement. Any tips or suggestions?
I was thinking of using an animated slider and tying it to the coordinates of the mouse from a pointer listener. Not sure what the math would be to accomplish this, so feel free to add suggestions there as well.
@abbadabbatech thx for the reply. I am trying to play via network url: https://www.sample-videos.com/video123/mp4/720/big_buck_bunny_720p_20mb.mp4' . My approach was to do this..but is doesn't seem to work. ''' void main() {
ui.platformViewRegistry.registerViewFactory(
'hello-world-html',
(int viewId) => IFrameElement()..src = 'https://www.youtube.com/embed/tgbNymZ7vqY'
);
runApp(Directionality(
textDirection: TextDirection.ltr,
child: HtmlView(viewType: 'hello-world-html'),
));
}'''
sorry about that.
'''
void main() {
ui.platformViewRegistry.registerViewFactory(
'hello-world-html',
(int viewId) => IFrameElement()..src = ' https://www.sample-videos.com/video123/mp4/720/big_buck_bunny_720p_20mb.mp4'
);
runApp(Directionality(
textDirection: TextDirection.ltr,
child: HtmlView(viewType: 'hello-world-html'),
));
}
'''
``
your code
``