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
    BLoC is a heavy pattern Google uses for some of their apps. They now recommend you start with Provider instead
    aishmahawar
    @aishmahawar
    Can we add google maps to our flutter website?
    Onat Çipli
    @onatcipli

    Can I use dart_style package in flutter_web ?
    When I try to import it,

    import 'package:dart_style/dart_style.dart';

    it gives error :

    GET http://localhost:53322/main.dart.js 404 (Not Found)

    Jacob MacDonald
    @jakemac53
    Check your console output, it likely failed to compile for some reason, or was skipped because it imports dart:io or something along those lines
    @onatcipli
    Ya, it has a ton of transitive imports that are not web compatible (they import dart:io)
    Norbert Aberor
    @norbertkross
    is it possible and if yes how can I test flutter_web on my phone. I tried copying the build folder onto my phone and opening the index.html file but doesnt show anything besides a blank white page
    Onat Çipli
    @onatcipli
    @jakemac53 I got it, So is there a way to use dart_style package in flutter_web ?
    Michele Gruppioni
    @GruppioFigo_twitter
    There is a way to open a link in flutter web?
    Yegor
    @yjbanov
    @GruppioFigo_twitter you should be able to use https://api.dartlang.org/stable/2.4.0/dart-html/Window/open.html
    Michele Gruppioni
    @GruppioFigo_twitter
    @yjbanov Many thanks! probably this is also what @czater was searching for
    Jacob MacDonald
    @jakemac53
    @onatcipli not within your flutter web app no, i would file an issue on the package if you need web support (but I don't know how feasible it would be)
    juanjoserodrigolazaro
    @juanjoserodrigolazaro
    Is it possible to have a webview inside flutter web?
    Randal L. Schwartz
    @RandalSchwartz
    no plugins yet available.
    webview is a plugin
    Yegor
    @yjbanov
    @juanjoserodrigolazaro I'm curious, what does it mean to have a webview in Flutter for web?
    Randal L. Schwartz
    @RandalSchwartz
    Yeah, actually with interop, you can have a native window
    not sure how gestures would apply
    Yegor
    @yjbanov
    Yeah, we will need to figure that out.
    But my question is mostly about the use-case. In Flutter for mobile it is pretty clear what the role of webview is. In Flutter for web it could mean several things.
    For example, it could be an <iframe>.
    Or, it could be a React component embedded in a Flutter for web app.
    juanjoserodrigolazaro
    @juanjoserodrigolazaro
    I need to get the url from the window without going out of the app, i dont need to open the link on other tab
    Thats why i was asking for webview
    Randal L. Schwartz
    @RandalSchwartz
    I think you can also get it from the Router...
    not certain though. that’s how you’d get permalinks for flutter mobile, I think
    Yegor
    @yjbanov
    Yeah, using router would be a more cross-platform way of doing that.
    juanjoserodrigolazaro
    @juanjoserodrigolazaro
    I’ll try to doit like that, thank you
    Jonathan Rezende
    @jodinathan
    doesn't using dart:html in flutter for web break flutter for mobile?
    Randal L. Schwartz
    @RandalSchwartz
    Yes, you’d have to have separate main.dart for each architecture, then pull in the common libs and the distinct libs.
    Derek King
    @derekbking
    Is there a way to access the camera on flutter web? Or potentially open an image picker similar to how the input tag works on a regular webpage i.e <input type=file accept=image/*>
    Randal L. Schwartz
    @RandalSchwartz
    probably not yet. no plugins yet.

    Can I use plugin X on the web?

    Plugin support for the web is currently in design stage. Please, stay tuned. In the meantime, you can use libraries listed on https://api.dartlang.org to access the browser API.

    Stephen Beitzel
    @sbeitzel
    So, I have a text data file that I’d like to read, parse, and hold in memory at application startup. Where should I put that file within my project, and how should my code reference it? Should it, for example, be in ${project}/web? In a WAR deployment, it’d be sitting in WEB-INF.
    Randal L. Schwartz
    @RandalSchwartz
    I wonder if that’s even possible in flutter web? Pretty sure web apps can’t read arbitary files, unless selected by the user.
    Stephen Beitzel
    @sbeitzel
    Yeah, sort of what I figured. Okay. SO, strategy-wise: I guess what I need to do is convert this text file into a big ol’ string, and parse it into a nice data structure at startup. It’s a dictionary of words, and if I were writing a mobile app I’d have the ability to package images and fonts and other assets along with the app. Other web apps would be able to make HTTP requests for the data file and then parse it as it arrives.
    I suppose I could host the file somewhere, but since it’s an app-specific resource, it makes logical sense to package it with the app.
    Randal L. Schwartz
    @RandalSchwartz
    probably not at startup but with a built_value at compile time to turn it into data structures.
    Stephen Beitzel
    @sbeitzel
    Hmm. Not really sure what built_value means. I haven’t run into that during my perusal of Flutter and Dart tutorials and documentation.
    Randal L. Schwartz
    @RandalSchwartz
    there are ways to build include files at compile time.
    Stephen Beitzel
    @sbeitzel
    Tell me more, please. :) Or, you know, hit me with a link to docs.
    Randal L. Schwartz
    @RandalSchwartz
    it’s a good solution for Flutter, where dart:mirror isn’t available.
    Stephen Beitzel
    @sbeitzel
    Cool, I’ll look at that. Thank you!
    hello everyone i currently have a problem with TextEditingController when i use it
    _textController.clear ();
    _textController.text = '';
    seems not working
    Kevin Moore
    @kevmoo
    Please file an issue! https://goo.gle/flutter_web_issue
    PSyCHoHaMSTeRza
    @PSyCHoHaMSTeRza
    Hi all. Can I ask a noob question? I'm playing around with flutter and I made a basic form. Now, if I make the class in the main.dart file and add MyForm() as a child in the body, it works. However, if I put the class in a separate file called form.dart, and import that in the main.dart file, it doesn't work. It's probably something simple that I'm missing, no?