skip to Main Content

Flutter – How to make it such that the UI initially shows a text box but when i click on it, a calendar widget pops up?

This is my widget that i want to pop up. CustomCalendar( earliestDate: DateTime.now() .subtract(const Duration(days: 120 * 365)), latestDate: DateTime.now() .subtract(const Duration(days: 18 * 365)), validationCallBack: (text) { BlocProvider.of< FormValidationBloc< KnowMoreValidationResult>>(context) .add(FieldUpdatedEvent( fieldName: formDefinition.dobField, value: text!.toIso8601String())); return null; }), I…

VIEW QUESTION

CompileError: Cannot find import 'dart:ui' with flutter_eval

I've set up flutter_eval in my Flutter project, but when I try to compile the .evc file of import 'package:eval_annotation/eval_annotation.dart'; import 'package:flutter/material.dart'; @RuntimeOverride('#myHomePage') Widget myHomePageUpdate(BuildContext context) { final elements = List.generate(10, (index) => Text('Number: $index')); return Scaffold( appBar: AppBar(title: const…

VIEW QUESTION

Gradle task assembleDebug failed when running flutter

Exception in thread "main" java.util.zip.ZipException: zip END header not found at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1474) at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1482) at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1320) at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1282) at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:709) at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:243) at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:172) at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:186) at org.gradle.wrapper.Install.unzip(Install.java:214) at org.gradle.wrapper.Install.access$600(Install.java:27) at org.gradle.wrapper.Install$1.call(Install.java:74) at org.gradle.wrapper.Install$1.call(Install.java:48) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) at org.gradle.wrapper.Install.createDist(Install.java:48) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)…

VIEW QUESTION

Flutter – This is about how to initialize Riverpod

I am learning about initializing the Provider used by Riverpod on this site. Therefore, it is explained that the following Provider initialization is old. @Riverpod(keepAlive: true) SharedPreferences sharedPreferences(SharedPreferencesRef ref) => throw UnimplementedError(); void main() async { final sharedPreferences = await…

VIEW QUESTION

How to call a named function from onPressed method of ElevatedButton in Flutter?

This works: ElevatedButton( onPressed: () => { setState(() { userInputTextControllers.removeAt(index); userTextList.removeAt(index); }) }, child: const Text("R")) ) This doesn't: ElevatedButton( onPressed: f(index), child: const Text("R")) ) f(int index) { setState(() { userInputTextControllers.removeAt(index); userTextList.removeAt(index); }) } Here, index comes from ListView.…

VIEW QUESTION
Back To Top
Search