Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Yegor
    @yjbanov
    We have a HashLocationStrategy that hooks up Flutter's Navigator to the URL. There are still bugs and missing features (e.g. we don't have "go forward" functionality; we didn't bother implementing in Flutter because mobile apps don't have such a thing). You should be able to link deep into your app, as well as use the "back" button. However, in general, this remains an area of development.
    We currently do not have a solution for SEO.
    (some design ideas for SEO are being discussed but no code has been written yet)
    MichealReed
    @MichealReed
    thx @yjbanov, any documentation you could point us to or is there a basic example anywhere?
    Yegor
    @yjbanov
    I'll see if I can find a more definitive answer when the engineer working on this shows up, but I'm guessing it's something like the following:
    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();
    }
    (if I were to set this up for the Flutter Gallery demo app)
    (edit: fixed botched import urls)
    MichealReed
    @MichealReed
    Awesome, will probably go ahead and open a stackoverflow post so people can find it via google. Do you want to post the answer there after you speak with him, or would you prefer me to relay?
    Green Appers, Inc.
    @GreenAppers
    Hm. Top result for search: flutter web text enter, is: flutter/flutter#19027
    I've added a reasonable search bar, but can't seem to detect enter.
    Sharable links work @MichealReed . e.g. http://www.cruzbase.com/#/height/20488 code: https://github.com/GreenAppers/cruzawl-ui/blob/master/lib/routes.dart#L43 Passing on the settings from onGenerateRoute to MaterialPageRoute is the key that tripped me up for awhile.
    MichealReed
    @MichealReed
    @GreenAppers I wrapped the whole page in a keyboard listener
    thx for linking the code
    cool to see a blockchain explorer on flutter web btw
    just posted my code on that issue btw
    Green Appers, Inc.
    @GreenAppers
    Thanks @MichealReed That's a good idea re: RawKeyboardListener. Probably have too many similar hacks accumulating.
    Green Appers, Inc.
    @GreenAppers
    However your solution has the great benefit of actually working. GreenAppers/cruzawl-ui@7189d52
    MichealReed
    @MichealReed
    nice :thumbsup: glad to help
    JianyingLi
    @lijy91
    FireShot Capture 001 - BottomNavigationBar - Flutter Widget Livebook_ - flutter-widget-livebook.blankapp.org.png
    I update flutter widget livebook website, add sidebar widget index. https://flutter-widget-livebook.blankapp.org
    Randal L. Schwartz
    @RandalSchwartz
    I saw a notice that you had to be running master branch to get the new —enable-web switch. is that still the case? I’d prefer running channel dev to get at least a bit more shielding from breakage.
    Randal L. Schwartz
    @RandalSchwartz
    having trouble googling for it. :(
    Randal L. Schwartz
    @RandalSchwartz
    Hmm. Still can’t find it. even asked on StackOverflow.
    Randal L. Schwartz
    @RandalSchwartz
    found it… flutter config —enable-web
    José Lecaros
    @lecaros
    hi, I'm crossposting this. I'm sorry if this bothers you.
    I'm using a local pub server but then some commands are failing (like repair cache and flutter upgrade) because it's not failing over to official pub server. Is anyone seeing this same behavior?
    *already posted in flutter/flutter
    Dima Rostopira
    @rostopira
    Does anyone knows how to stop flutter run -d chrome from closing window? I need log from JS console, silent crash isn't fucking useful at all
    Green Appers, Inc.
    @GreenAppers
    Does webdev serve help? That's what I always do. Haven't tried run -d chrome.
    Jacob MacDonald
    @jakemac53
    @rostopira the flutter tool integration is still a WIP and is not recommended for general use yet, but that being said you should open an issue
    MichealReed
    @MichealReed
    Hey @flutterwebteam does mobile web have support for accelerometer? How would I approach writing a plugin for web?
    Yegor
    @yjbanov
    @MichealReed we're working on a complete story for this. Right now you can import one of the core Web libraries (e.g. dart:html, dart:indexed_db, etc), or use dart:js or package:js to talk to JavaScript, which gives you access to everything the browser supports.
    MichealReed
    @MichealReed
    Oh awesome, I can interface with bluetooth apis as well this way?
    abbadabbatech
    @abbadabbatech

    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.

    Ankit Gupta
    @AnkitAndroaid
    Does anyone know can help me to deploy flutter web onto my AWS server? Any link to an article will be good too.
    abbadabbatech
    @abbadabbatech
    @AnkitAndroaid all should have to do is build and move the files to the web server directory. The built files are JS files, so nothing else is really needed to serve the pages that are built.
    agumbs1
    @agumbs1
    Hey, can anyone help me find a working code example of using a video player in a flutter web app? I have found only a few example on the web and none work for me.
    安卓小哥
    @asjqkkkk
    alt
    hey guys, I want to introduce this flutter app to you!It's beautiful and great for learning flutter
    Jonathan Rezende
    @jodinathan
    nice @asjqkkkk
    安卓小哥
    @asjqkkkk
    @jodinathan thanks! if you
    MichealReed
    @MichealReed

    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.

    agumbs1
    @agumbs1
    Hello all, has anyone tried playing videos within flutter_web? If yes, how did you do it?
    MichealReed
    @MichealReed
    ^ will have to dive into this at some point too, guidance would be appreciated from web team.
    abbadabbatech
    @abbadabbatech
    @agumbs1 where is this failing for you? You should be able to use a plug_in, you just may need to pull it in outside of pub packages. I will see if I can do a test and see if it works, are you trying to play from network or from a local file?
    agumbs1
    @agumbs1

    @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'),
    ));
    }'''

    @abbadabbatech - with the url changed to the sample video
    Randal L. Schwartz
    @RandalSchwartz
    @agumbs1 please put ``` on a line by itself both before and after your code
    agumbs1
    @agumbs1

    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'),
    ));
    }
    '''