Flutter

flutter error Invalid `Podfile` file: no implicit conversion of nil into String. ive searched through discussions but I cant seem to fix the issue

末鹿安然 提交于 2021-02-07 13:44:06
问题 This is the error I am receiving. I tried flutter clean and changing the syntax of some lines but im new to dart and flutter so im not really sure. I reinstalled cocoa pods and ruby as well but Im receiving the same error. I also made sure to update ruby to the latest version. [!] Invalid `Podfile` file: no implicit conversion of nil into String. # from /Users/(name)/Downloads/Projects/doctor_consultation_app/ios/Podfile:57 # ------------------------------------------- # unless File.exist?

flutter error Invalid `Podfile` file: no implicit conversion of nil into String. ive searched through discussions but I cant seem to fix the issue

丶灬走出姿态 提交于 2021-02-07 13:43:33
问题 This is the error I am receiving. I tried flutter clean and changing the syntax of some lines but im new to dart and flutter so im not really sure. I reinstalled cocoa pods and ruby as well but Im receiving the same error. I also made sure to update ruby to the latest version. [!] Invalid `Podfile` file: no implicit conversion of nil into String. # from /Users/(name)/Downloads/Projects/doctor_consultation_app/ios/Podfile:57 # ------------------------------------------- # unless File.exist?

Datetime timezone deserialization

有些话、适合烂在心里 提交于 2021-02-07 13:41:39
问题 I've developed a Rest API for my app. It sends to the app dates in the following format 2018-09-07T17:29:12+02:00 , where I guess +2:00 represents my timezone as part of one object. In my Flutter app, once I deserialize the received object, it substracts two hours to the actual received DateTime object. The class I'm trying to deserialize is defined as follows: import 'package:json_annotation/json_annotation.dart'; part 'evento.g.dart'; @JsonSerializable(nullable: false) class Evento { final

Datetime timezone deserialization

回眸只為那壹抹淺笑 提交于 2021-02-07 13:41:20
问题 I've developed a Rest API for my app. It sends to the app dates in the following format 2018-09-07T17:29:12+02:00 , where I guess +2:00 represents my timezone as part of one object. In my Flutter app, once I deserialize the received object, it substracts two hours to the actual received DateTime object. The class I'm trying to deserialize is defined as follows: import 'package:json_annotation/json_annotation.dart'; part 'evento.g.dart'; @JsonSerializable(nullable: false) class Evento { final

Flutter How to refresh StreamBuilder?

放肆的年华 提交于 2021-02-07 13:34:27
问题 Consider the following code: StreamBuilder<QuerySnapshot> _createDataStream(){ return StreamBuilder<QuerySnapshot>( stream: Firestore.instance.collection("data").limit.(_myLimit).snapshots(), builder: (context, snapshot){ return Text(_myLimit.toString); } ); } I want that the StreamBuilder refreshes when the _myLimit Variable changes. It's possible doing it like this: void _incrementLimit(){ setState(() =>_myLimit++); } My Question is if there is another, faster way, except the setState((){})

How to use showTimePicker as Widget in flutter?

被刻印的时光 ゝ 提交于 2021-02-07 13:34:13
问题 I want the user to pick the date and time, for that there is date time picker dialogue. But, is there a way that, I could show the date-time persistently on some flutter widget and use like any other widget? Container( child: showTimePicker( context: context, initialTime: TimeOfDay.now(), builder: (BuildContext context, Widget child) { return Theme( data: ThemeData.dark(), child: child, ); }, ); } but I cannot use showTimePicker as Widget. How to use showTimePicker() as widget? so that other

How to use showTimePicker as Widget in flutter?

社会主义新天地 提交于 2021-02-07 13:33:46
问题 I want the user to pick the date and time, for that there is date time picker dialogue. But, is there a way that, I could show the date-time persistently on some flutter widget and use like any other widget? Container( child: showTimePicker( context: context, initialTime: TimeOfDay.now(), builder: (BuildContext context, Widget child) { return Theme( data: ThemeData.dark(), child: child, ); }, ); } but I cannot use showTimePicker as Widget. How to use showTimePicker() as widget? so that other

Flutter How to refresh StreamBuilder?

馋奶兔 提交于 2021-02-07 13:32:17
问题 Consider the following code: StreamBuilder<QuerySnapshot> _createDataStream(){ return StreamBuilder<QuerySnapshot>( stream: Firestore.instance.collection("data").limit.(_myLimit).snapshots(), builder: (context, snapshot){ return Text(_myLimit.toString); } ); } I want that the StreamBuilder refreshes when the _myLimit Variable changes. It's possible doing it like this: void _incrementLimit(){ setState(() =>_myLimit++); } My Question is if there is another, faster way, except the setState((){})

Add different routes/screens to Flutter app

别来无恙 提交于 2021-02-07 13:20:30
问题 I'm trying to add multiple screens to my flutter app but can't get it to work. And there are no tutorials/ guides to do this. Does anyone have an example on how to accomplish this. Thanks in advance. 回答1: You can use the Navigator It's use is demonstrated in the Stocks example in https://github.com/flutter/flutter/blob/c8447c91a93cdee28eddb01ee3ace27b9362220f/packages/flutter/test/widgets/navigator_test.dart Navigator.pushNamed(context, '/second'); ... onTap: () => Navigator.pop(context),

flutter: fcm ios push notifications doesn't work in release mode

浪尽此生 提交于 2021-02-07 13:00:55
问题 I have bound my flutter-iOS app to firebase and i'm also using firebase-messaging and cloud functions for sending notifications via subscribing to topics, i'm using the APNs push notifications key of apple developer account. when i use the option runner>flutter run main.dart in release mode to build my app on my phone, fcm notifications doesn't work anymore, while it works in development mode, anyone can help me fix this? this is my index.json code: const functions = require('firebase