Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    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'),
    ));
    }
    '''

    Randal L. Schwartz
    @RandalSchwartz
    no, back quotes
    not apostrophes
    standard markdown syntax
      ``
      your code
      ``
    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