skip to Main Content

Flutter – Riverpod annotation for State Provider

I am new to Riverpod. I am using Riverpod Annotation to generate providers. As for Future Provider, I did it like this. @riverpod Future<void> login(LoginRef ref) async { final login = sl<LoginUsecase>(); final saveAuth = sl<SaveAuthUsecase>(); final loginForm = ref.read(loginFormProvider);…

VIEW QUESTION

Flutter – Incorrect Decimal Formatting in Dart code

Issue Description I'm experiencing an issue with formatting Decimal values in Dart. I have the following code snippet: import 'package:decimal/Decimal.dart'; Decimal formatDecimal(Decimal value) { String formattedString = value.toStringAsFixed(2); return Decimal.parse(formattedString); } void main() { Decimal decimalValue = Decimal.parse('8'); Decimal formattedValue…

VIEW QUESTION
Back To Top
Search