Questions tagged [statelesswidget]

121 questions
0
votes
1 answer

Stateless Widget for Checkbox and TextField

When i use Checkbox in StatelessWidget, I can't change checkbox to checked/unchecked at runtime but it's work if i use StatefulWidget. But, why i can change (typing) TextField value when I use StatelessWidget?
Iswanto San
  • 18,263
  • 13
  • 58
  • 79
0
votes
0 answers

How to tell flutter widget that keyboard doesnt change screen size

I was looking for a way to split my background in my flutter application using a wave, and I found this piece of code: Design a background from 2 images in flutter It works perfectly, and I could adapt it to my needs. The only thing I don't…
TryHard
  • 359
  • 2
  • 3
  • 15
0
votes
1 answer

how to pass data from StatelessWidget to StatefulWidget

Please , i want to pass data ( index and list from ItemList to FloatingActionButton in StatefulWidget) class _mes_adresseState extends State { DatabaseHelper databaseHelper = new DatabaseHelper(); _save(String token) async { …
0
votes
1 answer

Start a function from another Widget

Hey guys I have a (hopefully for you simple) problem. How can I start a function from another Widget? I have a statelessWidget from where I want to start a timer function, which is in a statefulWidget. How can I start the timer (which "is" in the…
simi
  • 323
  • 4
  • 12
0
votes
1 answer

How to scroll a ListView programmatically with StatelessWidget and provider in Flutter?

According to many Flutter provider tutorials, it is recommended to use StatelessWidget instead of StatefulWidget with provider. But I can't find a way to scroll ListView when using StatelessWidget. Suppose we have a ListView with many lines of…
tgarm
  • 473
  • 3
  • 8
0
votes
1 answer

How to create a button navigation bar with a stateless widget in flutter?

import 'package:flutter/material.dart'; import 'auth.dart'; // Log Out Button class HomePage extends StatelessWidget { HomePage({this.auth, this.onSignedOut}); final BaseAuth auth; final VoidCallback onSignedOut; void _signedOut() async { …
0
votes
1 answer

Issues with Flutter state

This is an experiment with Flutter. I was trying to create a paragraph generator in Flutter. Made a UI Loaded the data from a List. data.dart class MyData { static final List data1 = [ '0Title Of Page', '3Paragraph title…
Vettiyanakan
  • 7,957
  • 6
  • 37
  • 55
0
votes
1 answer

Does state as class requires SatefulWidget?

I am trying to learn the bloc pattern in flutter and creating one sample app using bloc framework. The app is a counter and has two buttons beneth the counter text field. Upon clicking on the True and False button currently Ii am just incrementing…
Hunt
  • 8,215
  • 28
  • 116
  • 256
0
votes
0 answers

Deeper understanding: Stateful widget is always rebuilt even though I am in different view?

Issue: GroupsOverview (which uses Futurebuilder - code is very long and not displayed here) seems to keep rebuilding when clicking through other views (as well as 'subviews') in the app which leads to too many Algolia operations. I think it's an…
user3532201
  • 579
  • 1
  • 9
  • 23
-1
votes
1 answer

Flutter Bottomsheet reload problem after dismissing keyboard

In a todoapp , am trying to edit a single task from a list of Tasks. After clicking on edit icon , I was able to open a bottomsheet widget using showmodalbottomsheet function with pre filled two text fields using texteditingcontrollers. When I tried…
-1
votes
1 answer

Flutter InkWell widget color not updating after Tap

I am having trouble coding a function. In my app, a quiz has been added, the quiz functionality works, the quiz data is retrieved from a server and delivered as JSON data. I have a problem where my app does not show whether a user's answer is…
-1
votes
1 answer

The default value of an optional parameter must be constant ? What is the actual issue?

Here body1 is Textstyle . its always shows error. when I try to add const keyword , its shows another error like below How can I override this issue?.
-1
votes
1 answer

Why is dart forcing me use const

I have this piece of code that intend to use in a stateless widget in flutter. const String default_question = 'the question'; class Trial { final String question; const Trial.standard() : question = default_question; } I use it like…
Harm
  • 109
  • 9
-1
votes
1 answer

Text not getting updated with new value in flutter

Hi I am new to flutter and experimenting with statefull widget. I am trying to build a timer and want to show it in a Text. This is my widget class. class MobileVerification extends StatefulWidget { static const String MOBILE = 'mobile'; final…
Purushotam Kumar
  • 1,002
  • 2
  • 13
  • 23
-2
votes
1 answer

In Flutter while building your app how do we decide when to use a StatelessWidget or StatefulWidget?

The core concept of StatelessWidget and StatefulWidget is confusing to me.
1 2 3
8
9