Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Randal L. Schwartz
    @RandalSchwartz
    except 3 not 2
    agumbs1
    @agumbs1
    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'),
      ));
    }
    Randal L. Schwartz
    @RandalSchwartz
    yes yes yes!
    JianyingLi
    @lijy91
    hi guys, I build a live preview widgets site built with flutter web. 100+ widget sample are now included. https://flutter-widget-livebook.blankapp.org
    Jonathan Rezende
    @jodinathan
    nice @lijy91
    RichText | Flutter Widget Livebook 2019-08-17 12-47-08.png
    a bug @lijy91
    JianyingLi
    @lijy91
    Thank you, I will fix it later.
    Amit Katz
    @TheOnlyArtz
    I want to know if it's possible to have URL parameters with flutter web
    Let's say I have a forum and I want to view a post by a URL
    This post has an ID
    So I want to go like /post/postID or even /post?id=<ID>
    Is it possible to achieve using flutter web?
    So if I go to my web browser and go to the URL http://localhost:8080/post?id=1234 in the Flutter code I will be able to take that ID argument in the post endpoint
    jow blew
    @joeblew99
    "webdev serve " does not work for me. I have to use instead "flutter pub run build_runner serve".
    takes ages to build
    sgon00
    @sgon00
    Hi, since I can do flutter config --enable-web now, do anyone know any available online doc talking about the best pratice to manage a flutter project for both mobile and web? It seems I still need to have two different versions of pubspec.yaml and remove all the packages which are not supported by the web. so any best practise? Maybe I just move all the common packages out to be a single lib package. So end up three dart packages. one for common class, one for mobile and one for web. Is this a good design? Thanks a lot.
    sgon00
    @sgon00
    OK. I was wrong about two diff versions of pubspec.yaml. I didn’t find the right procedure to do it. Flutter team hides this deeply. After following the right procedure, it turns out it has to be a completely diffrerent project/package due to flutter create —web . did something I am unsure. So, the question still applies. Should I create three projects (packages)? One for common, one for mobile and one for web? Is this best practise? I haven’t tried it if that way will work or not.
    juanjoserodrigolazaro
    @juanjoserodrigolazaro
    Can i get location
    On flutter web?
    Randal L. Schwartz
    @RandalSchwartz
    Yes, anything in dart:html is available to you.
    Window.location
    window.location sorry
    juanjoserodrigolazaro
    @juanjoserodrigolazaro
    Sorry in meant geolocation
    I cant implement it
    Randal L. Schwartz
    @RandalSchwartz
    what prevents you?
    @juanjoserodrigolazaro ?
    juanjoserodrigolazaro
    @juanjoserodrigolazaro
    @RandalSchwartz works for flutter web?
    Randal L. Schwartz
    @RandalSchwartz
    likely not… requires mobile hardware.
    you won’t find any solution that works in a desktop browser for geolocation
    at best, you can turn the local IP address into a guessed address.
    but this may be wrong because of VPNs and NAT’ed addresses.
    so what’s your actual goal?
    juanjoserodrigolazaro
    @juanjoserodrigolazaro
    I wanted lo get the latitud and longitud for getting near people
    Randal L. Schwartz
    @RandalSchwartz
    Yeah, desktops don’t provide that. The best you can do is reverse-geo the IP address, and that’s not reliable.
    juanjoserodrigolazaro
    @juanjoserodrigolazaro
    Thanks
    not sure if that works via dart:html or not....
    whereisdarran
    @whereisdarran_twitter
    juanjoserodrigolazaro
    @juanjoserodrigolazaro
    @wstrange working i found documentation at dart html you cant get lat and long with navigator. It has some exceptions like chrome that is only with https!
    So you cant test on yout localhost
    QubiSmartLocks
    @QubiSmartLocks
    Hi everybody!
    Any one knows how to focus next TextFormField when user type TAB/ENTER keys on desktop keyboard, using any web navigator (Safari/Chrome/etc)? I am trying using FocusNode with no success.
    Atakan Mert Kaya
    @Sekaiichi4_gitlab
    @QubiSmartLocks I'm also trying to figure this out right now, will let you know if I found a way to do it.
    Atakan Mert Kaya
    @Sekaiichi4_gitlab
    @QubiSmartLocks Figured it out, just wrap your TextField/TextFormField in a RawKeyboardListener like below.
    RawKeyboardListener(
         focusNode: FocusNode(),
         onKey: (event) {
              if (event.runtimeType == RawKeyDownEvent && (event.logicalKey.keyId == 54)) {
                   print("ENTER Key pressed");
                   //Do something
              }
         },
         child: TextFormField()),
    Atakan Mert Kaya
    @Sekaiichi4_gitlab
    I have to add to this, that it does somehow screw up your FocusNode of your TextFormFields...so be warned depending on your usecase.
    Dima Rostopira
    @rostopira
    Does anyone know how to preserve firebase auth when using firebase run? I have to reauth on every launch, it's annoying
    QubiSmartLocks
    @QubiSmartLocks
    @Sekaiichi4_gitlab my problem is not to get ENTER key presses, as you wrote, is keyId 54 (Digit 6???) and TAB key, keyId "Digit 2" (don't ask). My real problem is to focus next node. When I put node.nextFocus(); it jumps twice! Try it: Put 3+ TextFormField with all focusNode assigned... then, when ENTER key pressed, just go next... it jumps twice!
    clearsense
    @clearsense
    Hi, guys! I'm writing front for new project on flutter_web.
    Is there good way to rewrite url when using onGenerateRoute+MaterialPageRoute?
    There is workaround that i found so far: pass path param to page widget and do manual rewrite in initState:
    window.history.replaceState(null, widget.title, widget.path);
    But it isn't so great way, not very convenient, but mainly case of such scenario:
    "/#/" -> "/" -> press button -> "/profile" -> press "Back" browser button -> "/#/" (not "/")
    UPD. This is slightly better, but still hope to find "out of the box" way to do it
    window.history.replaceState(null, widget.title, '/#'+widget.path);
    Atakan Mert Kaya
    @Sekaiichi4_gitlab
    @QubiSmartLocks To be honest I have the same problem, even when you don't use the nextfocus() but instead manually request focus on the focus fields it skips. But I believe that it only happens because the next RawKeyboardListener is also active, so when you press ENTER, the next field also corresponds to that keypress. I wonder if there is a way to disable a RawKeyboardListener when it's focus node isn't focussed.
    Atakan Mert Kaya
    @Sekaiichi4_gitlab
    @QubiSmartLocks One solution is to have a boolean value "canEnter" check to see if you can focus on the next TextFormField, and have it go false as soon as the user presses ENTER. After which you can allow the user to only press Enter again by putting the boolean back on true only with OnChanged() of the TextFormField.
    JianyingLi
    @lijy91
    @yjbanov If I embed a flutter web project into an iframe, its Navigator won't work. Have you ever encountered such a problem?