Flutter-widget Questions
Ad
How can I perform filtering/searching school by writing the email address in flutter?
I would like to implement filtering/searching the university by typing its name like this picture below using flutter as a beginner. i would like
Flutter - Logic to create buttons within the app. Gridview, Listview or something else?
I am sorry to ask this question as i am very new to flutter and it may seem like a stupid one. i am trying to create an app that will create
Flutter reverse box shadow (from inside to outside)
So i have a boxshadow inside a container, inside the frontlayer of a
Child Property in Stateful Widget
I've made some test widgets to illustrate a point that i'm having difficulty with in a much more complicated widget. i have the following
Why Flexible widget filling all the available space despite its content being smaller?
I designed layout divided in two parts:- 1.horizontal lisview fixed at top 2.vertical scrollview for rest of layout i want
Why is 2 widgets need for Show modal Bottom sheet in flutter?
Why is 2 stateless widgets needed to create an modal bottom sheet in flutter? why can't we use one??? why do we have to have a main widget with
Flutter. Image rounded borders not working
I'm trying to make rounded corners of image. here is my code: cliprrect( borderradius:
What is the difference between the following var initialization positions in a StatefulWidget?
I was wondering about where to declare and initialize variables in the case of a statefulwidget. there seem to be a couple of ways to do it, but
No change of TextField when it is used in flutter
I'm wondering if it is possible. that the textfield doesn't change, when it is used. this is my code: import
Not able to clear text fields using reset method in flutter form
I am designing a form in flutter which is taking input for two text fields using textfield widgets, one time field using datetimefield and one day
Ad
How to Add and Use key in Custom widget constructors
I got notification warning (not error) about use key in widget constructors. let say i have stateless class like this :
How do I align all the widgets within list view at the center of the screen in Flutter?
Within the same body, i'm trying to align all my widgets at the center of the screen for my loginpage.dart file. but the result i'm
Flutter: setState() inside GestureDetector is not working
In my code i am loading network images into a grid. then i allow the user to replace a network image by selecting one from their own gallery.
How to disable a button for multiple click in flutter?
I am using list tile for showing items on a list,on clicking on these i will call my firebase function and some logic.but unable to find out any
error: The values in a const list literal must be constants. Flutter
Can any one tell me why is there an error. im a beginner in flutter. can
I'm trying to implement a favorites feature locally in flutter that works both inside the page and on the select page
I'm trying to add a favorites feature with flutter. if you activate it by clicking the favorites button inside the page, you need to implement it
How to put a Card widget inside a SliverAppBar?
I'm a beginner in flutter. i'm trying to make widget like this.
Flutter | auto_size_text inside of Expanded FittedBox
Disclaimer: i am very new to flutter, this is my first solo project that i am creating. all other projects have only been very
I want to add a page favorites button with flutter that is saved even in local context
I'm making a learning app. but here, i would like to bookmark only the problem i want out of hundreds of problems, so that the mark appears on the
The argument type 'Null' can't be assigned to the parameter type 'String'. Flutter Issue
@override widget? buildleading(buildcontext context) { return iconbutton( icon: animatedicon( icon:
GestureDedector's onTap event not working for Sizedbox
I've got a problem with ontap event for gesturededector. i tried in card too but not working. when i tap sizedbox nothing happens.
Ad
Class to Class Access Data
I have a problem with classes. i keep the user data in user_info_screen with google auth. how can i pull this user data in a class that has this
i can't fix : Could not find the correct Provider<AppUser> above this ProductItem Widget
Here is the code : streamprovider<appuser?>.value( value: authenticationservice().user, builder: (context,
I am trying to store the Authorization Token fetched from the Rest API and then use it in the headers of other API calls in Flutter
As the title of the problem explains most of it but will still elaborate more. so i am calling an api using the post method and registering a user
How to add a card widget dynamically whenever floating action button is clicked in flutter?
I am very new to flutter and was just curious to know how can we create a new card widget everytime a button (lets say fab) is clicked.
Json got parsed but the cannot display the data in the UI flutter [SOLVED]
I was trying to fetch data results from a rest api and then display it in the ui. so everything went well the json was parsed well the try and
How to get size of a child Widget
I have a special requirement to allow for a header widget, usually containing static content to appear at the top of a scroll view. the scroll
How to switching the stack's widget of index
How to switching the stack's widget smoothly when clicking the smaller widget, mentioned as the image below
Widget isn't a type
When i create a new widget then uper widget shows error. widget isn't a type.
Flutter OutlinedButton: set disabled color
On my flutter app i have an outlinedbutton with rounded corners: outlinedbutton( child: text( "a label", ),
Flutter : multi cursor of TextEditingController in an ExpansionTile widget
I have couple of texteditingcontrollers in an expansiontile. when i click on one of them, i get multi cursor on all of the
Ad
How Can i set same position of widgets for different device?
hi to everyone. i am setting position of icon widget. but it is changing on different device. how can i fix it? thanks
Completely center Widget in Flutter
I started to develop in flutter recently and i am having difficulties in centralizing a widget completely in the available space of view.
Flutter Checkbox with the radio button logic
I have been trying to get the radio button functionality using checkboxes in flutter but i could not come up with a solution for this issue. most
Passing a variable to another class from the state of another class
I am trying to pass the parameter username which has been received from another class to my homepage class. i want to pass that parameter from the
Change state of a widget from another widget
I have recently started working with flutter web. what is best practice to change state of a widget which is in one file (eg: home.dart) from
How to create a wave widget?
How to create a widget for displaying waves with custom color and blur effect in flutter? i want something like this:
Using Provider in Widget's initState or initialising life-cycle
So while learning flutter, it seems that initstate() is not a place to use providers as it does not yet have access to
Changing theme in runtime requires StatefulWidget, but isn't that ridiculously expensive?
I've recently finished a small side project in flutter and when i tried to implement theme changing in runtime, most answers i came upon involved
How do you use the setState() function as part of a Flutter widget?
Here's a dart stack that i'd like to be able to reuse: stack(children: [ align(
Override widget changing child widget in flutter
Basically i have two buttons widget that looks the same, the only difference is that one is with icon and the other not. this is my widget
Flutter - Pass Navigating Widget Name Dynamically
I have created a button widget to avoid duplication of code as there are multiple buttons on the screen. clicking on each button should take it to
Ad
How to conditionally render in Flutter
I have a wallet circle which is responsive to the payments that are done. what my issue is when ever the wallet amount is zero, i want the widget
Flutter popup widget
I have a flutter app screen where i'm listing search results, on the right top i have a search icon when clicked on it i want to open a popup
I want new (fresh) flutter page widget every time I open it
When i leave a page widget and come back to it later, it retains the previous info on the previous session. i would like to create a fresh page
Bring widget to front in flutter on touch
I am very new to flutter and i am coming from android development and i would like to do something equivalent to the bringtofront()
Do iOS and Android Flutter widgets also work on Flutter Web(PWA)
I'm interested in using flutter primarily for my startup mvp on web and possibly android. i see the flutter community has made a lot of widgets
How to check if two widgets are overlapping in flutter?
I wanted to know if we can check if two widgets in flutter are overlapping. i actually have two animatedcontainer stacked using stack. i wanted to
Radomly pick a number from contacts and call in flutter?
When user click or touch the button, the application will randomly pick a number from user's phone contact list and call. i see this kind of app
Swiping through cards in a vertical carousel in Flutter
I'm trying to create a social media feed where each post is a card of a different size, one on top of the other (almost like a vertical carousel).
How to open barcode scanner in a custom widget?
I want to open barcode scanner in a container - custom widget (not just barcode scanner qr). for example, while scanning the barcode at the top of
flutter icon is not centered in container
I was trying to center the icon in a circular background but it failed even if i use a center widget as child unless increase container size.
Stateless Vs Stateful rebuild
When a stateless widget is inside a stateful widget it will redraw or not? now the stateless widget can't be redrawn at run time but stateful can.
Ad
type '_Type' is not a subtype of type 'Widget?'
Here in my code the problem with the consumer auth, i found a similar q here but nor relevant with my error i tried to much ways to solve it, can
Unable to get Context update in Flutter even after updating the respective variables
In the below code even though my var light and var fan are updated on a regular intervals the overall text
How to display all products by category and sub-category wise in a single screen?
I have a list of products in my database as follows: database
It is safe to use StatelessWidget when the state changes with a Provider?
I see that the flutter team advise this: for example, in android, this is similar to placing an imageview with your logo. the
why crossAxisAlignment and mainAxisAlignment is different in row and column
As we all know, for row: mainaxisalignment = horizontal axis crossaxisalignment = vertical axis for column:
How do add or remove a component from the layout in Flutter?
How can add and remove any widget such as container or text from the flutter app? like on the screen where you press any button and it adds or
How to show a widget over the keyboard in Flutter?
I want to place a widget on top of everything (a loading widget), but i can not manage to place it over the keyboard too. i've tried some
Flutter :[cloud_firestore/unknown] NoSuchMethodError: invalid member on null: 'includeMetadataChanges' (Flutter Web)
I am trying to fetch data from friebase-firestore and then convert it to model, i used the same code and approach to another project (web project)
flutter: supported language is throwing error (Localizations.of<MaterialLocalizations>(context, MaterialLocalizations) returns null)
Every time startting my app i get the following warning in the log: ════════ i/flutter (22601): warning: this
Flutter - Failed assertion: line 61 pos 12: '_route == ModalRoute.of(context)': is not true
On the click of a button in my app a popup opens. clicks on the button once, then it works fine, but whenever i click on that button continuously
Flutter: What is the difference ButtonStyle() and .styleFrom()
I am new in flutter. here is my code, for elevatedbutton, elevatedbutton( onpressed: () {
Ad
How to build a custom bottomNavigationBar in flutter with a centered button?
I have tried so much to build this bottomnavigationbar with the curve and space between icons.
Flutter add to List<Widget> crashes beacuase of type issues
I have an issue i don't understand. widget build(buildcontext context) { list<widget> menulist =
Update ModalBottomSheet after api call in flutter
I am new flutter , developing an application which call an api and fetching data from server which is showing on a bottom sheet. in this case iam
Flutter: Hero widget, Navigation 2.0 and Provider are not working properly together
I tried to use hero widget with changenotifierprovider and the new navigation 2.0 system. but i am facing issues there.
Flutter - Create a custom styled Container widget which "projects" child content
I want to create a custom container widget that always has a gradient background. the reason is to only code the gradient in one place, so it can
Exception caught by widgets library 'package:flutter/src/widgets/sliver.dart': Failed assertion: line 543 pos 15: 'children != null': is not true
My all future builder occure error how can i solve
Flutter web - How to listen on open Drawer state and close it
Im working on flutter responsive web ui. and i want to close the opened drawer on a specific screen width for mobile and desktop screen width, so
Flutter: SnackBar inside Dismissible widget is not working properly
My home screen is a scaffold with a list of dismissible widgets at its body. the child of each dismissible
How to show progress indicator when fetching data from API?
The problem is very simple but i am unable to find a proper solution. i have a search screen and here is what i want to do. when
Ad
Flutter: Detect rebuild of any widget which is not visible on screen but is in the widget tree
Summary: as showing a page/route using the navigator, a new branch is created from the nearest materialapp parent. meaning
Flutter Text Widget
I have a simple screen with three text widgets and when the user click on one of these text widget that text should turn black font text color and
Use image as background of custom shape Card/Material widget
There is a continuousrectangleborder paint which i can pass to the shape parameter of card or material
How to update widget state built inside FutureBuilder
Before, i used listbuilder to generate a list of 70 numbers and it worked but it took a long time to generate the 70 numbers into
How to vertically or horizontally center a Widget in a Stack?
The center widget centers a widget horizontally and vertically in the center of a stack. how can one center a widget only
Flutter Hooks Fetching Data using useEffect - setState() or markNeedsBuild() called during build
Currently exploring functional_widgets and flutter_hooks. having same idea with reactjs i'm fetching data with the following code.
display row in flutter if certain condition is true or false
There is a row of widgets in flutter, i want it to be visible on meeting certain condition, if the condition is true it should not be visible and
Can a StatelessWidget contain member variables?
I have a statelesswidget that uses a scopedmodel to store its data. the widget basically presents a list of checkboxes
How to call a ontap fuction in another widget indirectly in flutter?
I'm using animated container for getting toggle button like in android. here my code is working for toggle button function perfectly. but what i
Flutter how to build a Widget list from data passed?
Im new to flutter and i am trying to figure out how write a function that builds a widget beased on the data being passed from
How to reuse child of Stack widget in Flutter
Imagine i have a stack widget that only has 3 child widgets to display user profile. and i got multiple user profile data from the server. but i
Ad
Flutter: The widget values inside the ListView are not updated when an item is removed
Hello i am new on flutter, i am work in a widget named split row, i use a listview with three childrens: text widget, listview builder widget and
Flutter - How to change the Color class' value that placed inside a custom widget?
I'd like to create a widget that i'll use it a lot of times, so i don't have to create it manully. here's what i've built:
Best way to increase GestureDetector area
What is the best way to increase the gesturedetector area? i'd like to avoid to use a container with custom width and height i've
How can I paint a Widget on a Canvas in Flutter?
Is there any way to paint a widget at a given position on a canvas? more specifically, i want to paint the child
How to set the start point of clippath
I'm about to make a shape using clippath(). but when i draw it, it seems that it starts from the (0.0) coordinates of its parent. but
How do I align these widgets?
I am making a practice app in flutter and stuck on this: how can i align widgets such that; 1. an icon stays at extreme left of appbar 2. text
flutter_gauge widget won't update index value on setState
The problem i'm having is that although i'm successfully updating a value of my meter (fluttergauge) widget via setstate, the widget itself does
How to shrink and grow icon animation in flutter?
I am using the below code to perform animation-grow and shrink animation of the icon but for it, i have to click on the icon, i want the animation
Fill background color of Image in flutter
Is it possible to add a background color to the icon image? i am using the below code to render icon. icon(
Flutter: Unable to read data from firebase. The method '[]' was called on null error
I am trying to read the data from firebase after scanning a barcode. this is how it should appear, but instead of barcode, it should
Why isn't Android Studio showing widget elements on mouse click?
I saw a video tutorial on flutter coding, of mouse clicking on a widget showing additional information about widgets. details of that are shown
Ad
Flutter how to change TextField borders after certain condition
So i'm trying to create a signup form where there are textfields. what i want to do is, if the signup button is pressed and it has empty fields in
How to convert class to listview in list.builder
I am using a plugin called icapp_license for flutter which creates a file which includes all the license of the plugins you use so the output was
Ad
Blog Categories
Ad