Linked Questions

0 votes
1 answer
714 views

I am trying to make a Music Playing App. And in that app i want to implement search feature. This requires me to show list of 5 answers related to query only if the user is trying to search, else do ...
Pokemon Hacker's user avatar
4 votes
3 answers
25k views

I need to know is it possible to use ternary/if else inside flutter widgets. I'm trying to create a buttonCreator widget which will take few parameters, one of which will be the background. I need ...
Sewer's user avatar
  • 39
2 votes
5 answers
13k views

How do I create a loop or if-statement inside a widget in flutter? It seems that you only can make a single line condition like: if(condition) but if you try to use brackets: if(condition){ } it ...
cueless's user avatar
  • 121
5 votes
2 answers
5k views

Here's some pseudo code showing what I'm trying to achieve: Text txt(text, [subtitle = false]) { final params = subtitle ? { 'textAlign': TextAlign.center, 'style': ...
darksoulsong's user avatar
  • 15.5k
1 vote
2 answers
6k views

I want to use if statement with container widget like this code : if (int.parse(m_id) > int.parse(cm_id) || int.parse(d_id) > 4) { Container( width: 0.23 * size, ...
Sermed Berwari's user avatar
1 vote
2 answers
2k views

I am trying to make a drawer in the class DetailedPage only when the previous class was CameraPage. To achieve this, I create a variable String previousScreen = 'CAMERA' and passed the variable to the ...
gsk's user avatar
  • 107
1 vote
3 answers
2k views

I have a container in which there are 2 fields. 1 is a percentage and the other is simple Text. What I need is I don't want to show the percentage container and when I click on the container it will ...
Shahnaz Raheem's user avatar
1 vote
4 answers
758 views

The following without braces worked fine: import 'package:flutter/material.dart'; void main() { runApp(const _MyApp()); } class _MyApp extends StatelessWidget { const _MyApp({super.key}); @...
shingo.nakanishi's user avatar
0 votes
2 answers
2k views

I wanted to set the "done" icon for switch when it is on, and "close" icon when it is off. Here is a sample image: I am looking for same toggle switch as shown in the image, in ...
Santhosh Acharya's user avatar
0 votes
1 answer
700 views

I am following Angela Yu's introductory course on Flutter and extending the Quizzler project for personal challenge. At the end of a quiz, I give the user a chance to start again (show the first ...
daedalus's user avatar
  • 10.9k
-2 votes
1 answer
459 views

I'm having hard time creating logic for this. I jave a flutter app in which i want to show same screen for both admin and user but for admin i want to add CRUD facilities. How can i achieve this in ...
Asif Shaik's user avatar
0 votes
1 answer
334 views

if condition when post.text == 1 i setup Widget named exteranews Widget exteranews(BuildContext context) { double siz11 = 15.0 * MediaQuery.of(context).size.width / 414.0; } how to use ...
Mikel Tawfik's user avatar
0 votes
1 answer
393 views

I want the Expanded widget to change dependent on 'Button 1', 'Button 2' or "Button 3' is pressed. The buttons is just text wrapped in a InkWell, I can change this, but it is only for purpose of ...
Piet Pillay's user avatar
0 votes
2 answers
136 views

Quite often I only want to draw a Widget based on a condition. For example, I may be creating a component that displays a FadeIn.image but the image: may not be set in the CMS. In this case I want to ...
Flutter_say_what's user avatar