Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Zlati Pehlivanov
    @talamaska
    the warning I see is
    The package `my_app_name` does not include some required sources in any of its targets (see their build.yaml file).
    The missing sources are:
      - $package$
    Please help me understand what I have missing, the docs for the build_runner are pretty confusing and i couldn't find what is that key that I miss and what should I specify for it
    Simon Binder
    @simolus3
    Well, it just wants you to add that input:
    targets:
      $default:
        sources:
          include:
          - i18n/**
          - lib/**
          - $package$
    MyScouts
    @MyScouts
    ảnh.png
    1 reply
    i have some error with moor flutter. I need Help! Thanks
    Simon Binder
    @simolus3
    Since the analysis error happens in the SDK, this might be https://github.com/flutter/flutter/issues/62240#issuecomment-668997665 (see comment for workaround). If that doesn't work, can you re-run the build with flutter pub run build_runner build --verbose and post the logs to a new issue?
    MyScouts
    @MyScouts

    Since the analysis error happens in the SDK, this might be https://github.com/flutter/flutter/issues/62240#issuecomment-668997665 (see comment for workaround). If that doesn't work, can you re-run the build with flutter pub run build_runner build --verbose and post the logs to a new issue?

    is not working

    Jermaine Oppong
    @graphicbeacon
    Anyone else getting this exception when running pub run build_runner build with the sourcegen package:
    [SEVERE] source_gen_example:orderLibraryBuilder on lib/builder.dart:
    
    Bad state: Unexpected diagnostics:
    /usr/local/Cellar/dart/2.9.1/libexec/lib/core/uri.dart:3259:39 - Expected an identifier.
    Jermaine Oppong
    @graphicbeacon
    Ah, seems to have been resolved by running pub upgrade
    Randal L. Schwartz
    @RandalSchwartz
    nothing a little pub clean won’t help eithe.
    Jermaine Oppong
    @graphicbeacon
    Yeah, source_gen YouTube tutorial coming up :)
    Douglas Bett
    @bettdouglas
    Hi, I'm trying to use angel_orm to generate orm classes and this comes up
    Precompiled build_runner:build_runner. [INFO] Generating build script completed, took 260ms [SEVERE] Build: Nothing can be built, yet a build was requested.
    Jermaine Oppong
    @graphicbeacon
    Hey folks, just released a video tutorial on the source_gen package -> https://youtu.be/hgDbFLnLDNc
    Nate Bosch
    @natebosch
    @graphicbeacon - very well done. Thanks for sharing!
    Sunbreak
    @Sunbreak

    @natebosch Thanks to your blog about the new build system: https://lessworsemorebetter.com/2018/04/17/dart-builds-how-did-we-get-here.html.

    We're exploring auto-generated log into AngularDar or Flutter Web framework method, something like https://medium.com/flutter/building-performant-flutter-widgets-3b2558aa08fa
    Is it possible to use source_gen?

    Jermaine Oppong
    @graphicbeacon
    Cheers @natebosch!
    Simon Binder
    @simolus3
    What's the reason we can't use non-lib assets outside of the root package? They're excluded by the asset tracker and rejected by buildStep.read*, but what's so special about them? I'm trying to setup a multi-package build where a non-root package has build steps reading files outside of lib/ (but in the same package), and was surprised about this behavior.
    wade
    @wade-liwei
    how to fix the problem ?

    (base) adeMacBook-Pro:mooncake a$ flutter pub run build_runner build
    Precompiling executable...
    Failed to precompile build_runner:build_runner:
    ../../../../../.pub-cache/hosted/pub.flutter-io.cn/build_resolvers-1.3.7/lib/src/resolver.dart:343:10: Error: Method not found: 'SummaryBuilder'.
    return SummaryBuilder(sdkSources, sdk.context)
    ^^^^^^^^^^^^^^
    ../../../../../.pub-cache/hosted/pub.flutter-io.cn/build_resolvers-1.3.7/lib/src/resolver.dart:332:7: Error: The setter 'useSummary' isn't defined for the class 'FolderBasedDartSdk'.
    - 'FolderBasedDartSdk' is from 'package:analyzer/src/dart/sdk/sdk.dart' ('../../../../../.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.39.17/lib/src/dart/sdk/sdk.dart').
    Try correcting the name to the name of an existing setter, or defining a setter or field named 'useSummary'.
    ..useSummary = false
    ^^^^^^^^^^
    pub finished with exit code 1
    (base) adeMacBook-Pro:mooncake a$ flutter version
    [!] The "version" command is deprecated and will be removed in a future version of Flutter.

    1.20.3
    MyScouts
    @MyScouts
    how to check textfield selected or no select flutter?
    i want hide widget when textField select
    Simon Binder
    @simolus3
    It's not the right place, but I guess this might be because you only have the Dockerfile in one subpackage of your project? That would explain why ../listing_birdie_common can't be found when running pub get in Docker.
    rdmorris
    @rdmorris
    @simolus3 Thanks for the help
    MyScouts
    @MyScouts
    I Need help! I wan't collapes or expaned ExpansionTitle
    Patrick Minogue
    @afpatmin
    Hey, is there some way I can set and read environment variables when using ddc?
    Nate Bosch
    @natebosch
    Do you mean when running the app? No, the browser does not have access to read or set environment variables
    Patrick Minogue
    @afpatmin
    @natebosch sorry I meant in the build phase
    so far I've only managed to get it working in dart2js using dart2js_args in build.yaml
    now that I think about it, it's not actually environment variables I need, but build time constants if that makes sense
    Nate Bosch
    @natebosch
    Ah, you can specify that in build.yaml. Note that ddc config must always be in global_options.
    global_options:
      build_web_compilers:ddc:
        options:
          environment:
            SOME_VAR: 'some value'
    With that I think String.fromEnvironment('SOME_VAR') should work.
    Patrick Minogue
    @afpatmin
    just what I was looking for, thanks!
    Nate Bosch
    @natebosch

    I did find that this was underdocumented so I added a section on it to the README:

    https://github.com/dart-lang/build/tree/9edeee7dc81d5915f852e0152289b27447aca08d/build_web_compilers#configuring--d-environment-variables

    This also describes how to define these on the command line - it's an unfortunately long argument.

    Note that parsing for booleans is broken in the current versions so it's better for now to always uses strings - 'true' instead of true for bools. Same for ints - '1'. In future versions this shouldn't be necessary.

    Patrick Minogue
    @afpatmin
    awesome, thank you
    mnordine
    @mnordine
    @natebosch I feel that's important info that's well-hidden right now. Maybe entries at least on https://pub.dev/packages/build_web_compilers would help
    sorry, looks like that will get in when you publish to pub :thumbsup:
    I find it surprising the bools don't work. Unfortunately, I think that'll trip a lot of people up
    Nate Bosch
    @natebosch
    yeah,I think that's unfortunate too. I did fix the problem in dart-lang/build#2847 but I haven't published yet.
    mnordine
    @mnordine
    awesome
    Abdou Ouahib
    @zettai-dev

    Hi, I'm using json_annotation with json_serializable to validate json responses, and I'm wondering why isn't there a way to validate the types, and catch an exception if some type is invalid, so far these are the exceptions I catch:

    } on FormatException catch (e) {
      // it's not a valid json
    } on MissingRequiredKeysException catch (e) {
      // a required key is missing
    } on DisallowedNullValueException {
      // a required key is null
    }

    I'd like to also catch an exception for when a type is mismatching the expectation. For example I'm expecting {"seen" : true} but I'm getting {"seen": "hello"}, is there a way to use json_annotation to catch this error? If not, why? is this not a very important thing and can be done otherwise?

    Simon Binder
    @simolus3
    @zettai-dev If you enable the checked build option, those exceptions would be wrapped in a CheckedFromJsonException.
    Alan Knight
    @alanknight-wk
    In Dart 2.10 the VM now has several sub-commands, but they each seem to have far fewer command-line options than were previously available? In particular, the --define option doesn't seem to be there any more. How would I set a value that was to be found via a const fromEnvironment function? Also, is there a way to run from source from a different directory and specify the package config or packages directory? Like, if I wanted to run 'dart $SDK/dev_compiler/bin/dartdevc.dart --packages-directory-for-ddc= , when I'm running it in the directory that I want to compile in, not the ddc dir in the SDK?
    Patrick Minogue
    @afpatmin
    @alanknight-wk I stumbled on a similar issue a few days back, @natebosch pointed me in the right direction and updated the build_web_compilers readme https://github.com/dart-lang/build/tree/9edeee7dc81d5915f852e0152289b27447aca08d/build_web_compilers#configuring--d-environment-variables
    Nate Bosch
    @natebosch

    @alanknight-wk I would expect the dart command to still support -D defines to run things but I'm not sure which subcommands would support or need it. Is it dart compile that you are trying to use? I don't think that defines would be meaningful other than in compile or run.

    We don't have full support for running dartdevc.dart. I'm not sure specifically what you are looking to do with that command but I do know that it doesn't currently read language versions from package_config.json by itself.

    Alan Knight
    @alanknight-wk
    I'm trying to use dart run. And it doesn't seem to support -D or --define, it says either one is unknown. This is in the context of dart-lang/sdk#38102 . What I'm doing is running dartdevc with --observe, because it goes exponential computing hashcodes on our code, and I would like more information about why. I can run it from a snapshot, but I don't get full debugging capabilities. And I can run it from source if I run from its SDK directory, but then I'm not in the current directory for the compile command I want to run. Or I can turn on debug logging in fasta using --define, except I don't have a way to do that. Since, in the absence of debugging, I have to insert print statements into ddc, I just hard-coded them on instead.
    @afpatmin Thanks. Unfortunately, what I want to do is turn them on when running on the VM.
    Akshat Tamrakar
    @dev-akshat
    Can anyone please tell me how to create and run AngularDart 6 web application ?
    Ayham AlSkhbouri
    @rYzrPKpVrtNZfy8_twitter
    the getter isn't defined for the type Icon
    What is the solution?
    Randal L. Schwartz
    @RandalSchwartz
    which getter? What is the error message?