Comments (6)
Sorry , forgive me I didn't notice the first change.
It works thanks
from formz.
You should change the
DateTime
to
DateTime?
from formz.
Sorry but which DateTime I should change ??
I edited DateValidationError? validator(DateTime value) to be DateValidationError? validator(DateTime? value) , but it still not accepting null .
The error still the same , The argument type 'Null' can't be assigned to the parameter type 'DateTime'
If there is any other way to pure DateTime please let me know
from formz.
class DateInput extends FormzInput<DateTime?, DateValidationError> {
const DateInput.pure() : super.pure(null);
const DateInput.dirty(DateTime value) : super.dirty(value);
@override
DateValidationError? validator(DateTime? value) {
return null;
}
}
from formz.
Yes , I tried that ,but it gave me this error.
`Error: The value 'null' can't be assigned to the parameter type 'DateTime' because 'DateTime' is not nullable.
- 'DateTime' is from 'dart:core'.
const PaymentDateInput.pure() : super.pure(null);
`
This is part of pubspec.yaml
`version: 1.0.0+1
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cupertino_icons: ^1.0.2
dart_json_mapper: ^2.0.7
dart_json_mapper_flutter: ^2.0.0
datetime_picker_formfield: ^2.0.0
equatable: ^2.0.0
flutter_bloc: ^7.0.0
flutter_secure_storage: ^4.1.0
formz: ^0.4.0
graphs: ^1.0.0
http: ^0.13.1
url_launcher: ^6.0.3
dependency_overrides:
glob: ^2.0.1
reflectable: ^3.0.1
intl: ^0.17.0
dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^1.11.5`
from formz.
Are you serious?
You haven't copied my entire code.
I changed it on two places.
from formz.
Related Issues (20)
- docs: provide interactive demonstration on README
- test: include tests in example
- Docs: more complex examples/use cases in combination with bloc HOT 1
- Clear a TextField without a TextEditingController. HOT 1
- Update to Flutter 3.16.0/Dart 3.2
- docs: include CONTRIBUTING.md
- chore: release 0.7.0
- Form-Level Validation Rule
- Performance-friendly validation HOT 1
- toJson fromJson support HOT 1
- How to use Formz with required and optional fields? HOT 2
- Add `isInProgressOrSuccess` to `FormzSubmissionStatusX` extension HOT 3
- [QUESTION] Formz is validating a textfield with text as empty unless textfield is changed
- Validate if the form is pure 0.5.0+1 HOT 1
- FormzStatus is not accessible in formz: ^0.5.0+1 HOT 1
- Some fields do not require validation HOT 2
- FormzSubmissionStatus HOT 2
- example/lib/main.dart
- Use freezed with FormzMixin HOT 5
- mixin isDirty
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from formz.