Flutter, pass datetime value to a method

I currently have a page where i can select a date range, after that i have a search bar, and then a listview. When i select dates, and i click on submit, dates are dis...

Unhandled Exception: FormatException: Trying to read yyyy from null at position 0

I tried to use dateTime to open or close the access to the registration form, I saved the value of open or close date in my Firebase.. so I must retrieve the date valu...

How can I show greetings like Good Moring, afternoon or evening base on users time in flutter

I want to greet user when they visit my app I have tried using TimeOfDay but it isn't working. <pre><code>TimeOfDay now = TimeOfDay.now(); greetings(St...

How to get GMT timeoffset value for current time in Dart/Flutter

I'm developing an application where I need to get only GMT offset time, i.e. for India +5.30. How do I achieve this dart. var now = new DateTime.now(); var...

Timestamp.now() auto date time for messenger

I'm trying to create an app that allows users to chat with each other and to order the messages i'm using Timestamp.now() ( that works fine ) but the problem is that i...

Using Flutter and Dart, why String variables value is changing over screen transfer?

At my first screen this is the code and result: <pre><code>appController.mydate=DateTime.parse(info.timestamp).toLocal().toString().substring(0, DateTime.parse(inf...

How to parse date time in flutter

I getting below date time from server <pre><code> datetime:2020-07-17T03:18:31.177769-04:00 </code></pre> and I'm using below code to...

How to get date range for a particular week number

I am trying to get date range for a particular week number. Following is my code to get week number with respect to current date <pre><code>final date = D...

How to save the user Selected Date into firebase database in flutter

How to save the user 'Selected Date into firebase database in flutter. I am able to successfully save the text data into firebase database where as I...

Flutter SEMBAST database: insert new item in a list of an object

Want to insert a new item in a list of an object in SEMBAST database, object JSON format: <pre><code>{ id: 1, name:...

How to build static datePicker widget in Flutter, without the need to press a button before

I want to build a static DatePicker with Flutter, without the need to press a button before. When the screen loads it should display the picker. Tried flutter-cupertin...

The method () was called on null. [Flutter]

In this app, the user will be able to add a task and i wanted to give the option to select the date on which the user wants to save a task (at a later date; one week,...

Passing a value (age) from a widget to another

Through textfield inputs, age of user is obtained with the following code (truncated for simplicity): <pre><code>onChanged: (valueYear) {...

flutter - DateTime.now() not same in my local time

I have a case to check the store opening-closed hours. Im solve this using the code below: <pre><code>final _openHours = 09; final _openMinute = 00; final _closeH...

How to compare 2 hours from dateTime flutter

Im getting an error saying i have wrong hour format when my hour format is 17:30:00 when comparing it to another hour, both my hour here is the code: <pre><code>...