Comments (5)
The recommendation would be to implement a copyWith method
A good solution for that is to use https://github.com/rrousselGit/freezed which generates it for you.
So you'd have:
state = state.copyWith(status: '1')
from riverpod.
@rrousselGit after learning about this package, copyWith
dont have named parameter or should type manually ? ctrl + space
not showing it.
UtangModel.dart
@freezed
abstract class UtangModel with _$UtangModel {
const factory UtangModel({
String idUtang,
UserGoogleModel pembertang,
UserGoogleModel pengutang,
String totalUtang,
String sisaUtang,
DateTime tglKembali,
String status,
String keterangan,
String selfie,
String ttd,
DateTime createdDate,
}) = _UtangModel;
factory UtangModel.fromJson(Map<String, dynamic> json) => _$UtangModelFromJson(json);
}
from riverpod.
You're facing this issue rrousselGit/freezed#137
It's a bug in the auto completion
from riverpod.
@rrousselGit glad to hear , i think i can close this now.
from riverpod.
@rrousselGit glad to hear , i think i can close this now.
You can use copyWith.call()
to have autocomplete. freezed
delegates the call to copyWith()
to the call()
method so it should work the same
from riverpod.
Related Issues (20)
- Is it possible to do eager-initialisation of ProviderScopes? HOT 1
- examples/pub dependencies and auth problems HOT 1
- The subclass of AutoDisposeNotifier can always obtain internationalization, even if the phone's system Settings are Chinese, and finally English HOT 2
- Option to ignore previous state in AsyncValue by default HOT 3
- Support async `onDispose` HOT 3
- invalidation forwarding HOT 5
- docs: invalid use of `Uri.https` in readme HOT 1
- Read a HOT 1
- Read a "disposed" notifier HOT 1
- Refactoring Propositions dropping out when updating flutter HOT 2
- Add exception handling to 'ref.refresh()' HOT 6
- Add something like `ref.watchStream(...)` HOT 10
- ProviderScope state wrongly disposed possible bug HOT 3
- Add Japanese docs
- [riverpod_generator] `dependencies` does not respect `provider_family_name_suffix` option
- StateNotifierProvider always refreshs when invalidated problem still exists HOT 3
- Error: 'LintCode' is imported from both 'package /src/dart/error/lint_codes.dart' and 'package /src/lint_codes.dart' on Flutter 3.24.0 with build_runner HOT 3
- VS Code refactoring options are not available with Flutter 3.24 stable release HOT 4
- `initialValue`-like behaviour for the FutureProvider HOT 7
- `flutter` dependency included when using Riverpod in a server-side environment HOT 1
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 riverpod.