問題タブ [flutter-dependencies]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
0 に答える
738 参照

android - アプリがアクティブまたは閉じているときに通知が表示されない

これらのプラグインを使用するScheduled Notificationsと、 、Local NotificationsFirebase Cloud Messaging、通知が正しく機能します。ただし、通知が表示されない場合がいくつかあります。

  1. アプリをまだ開いていない場合は、
  2. アプリが開いていて、アプリを使用している場合
  3. アプリを殺した場合

このような状況でも通知を表示するにはどうすればよいですか?

0 投票する
2 に答える
1527 参照

flutter - Dart built_Value, BuiltList error in serializer - Arguments of a constant creation must be constant expression

I have the following json object

I have created the following object model using built_value

And the following seralizer for json deserialization:

The login object model worked fine and is working as expected but when I added the NotificationList to SerializersFor, the serializer.g.dart file started throwing errors. I am getting this error message for BuiltList in the serializers.g.dart file

Arguments of a constant creation must be constant expression

Invalid constant value

Undefined name 'BuiltList'

Undefined class 'ListBuilder'

On trying to compile I am getting this error which says the same thing

Not sure where I am going wrong or what the issue could be. Using the following versions for built_value and built_collection

This is the serializer.g.dart file generated:

Any help will be greatly appreciated.