Why I got A RenderFlex overflowed by 8.0 pixels on the right With flutter?

Hello everyone I’m trying to display an alert with flutter bu I got this error: A RenderFlex overflowed by 8.0 pixels on the right. this is my code: return showDialog( context: context, barrierColor: Colors.transparent, builder: (context) { return AlertDialog( title: Flexible( child: Row(children: [ Text( ‘ Alert Dialog Title. $a ‘, ), Image.asset( ‘assets/alert.png’, scale:… Read More Why I got A RenderFlex overflowed by 8.0 pixels on the right With flutter?

how to have a button build a widget and have it setstate

I currently have a InkWell that builds a custom widget alert dialog when pressed using the build method below. InkWell( onTap: () => showDialog<String>( context: context, builder: (BuildContext context) => Popup(), I also need it to set the state of some Bools and Int’s when pressed which usually happens when using the setstate method. can… Read More how to have a button build a widget and have it setstate

Row space between is not separating children

I made a row and I need to separate its children with space between, but it’s not separating. This is the code: Container( height: 51, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container(width: 56, height: 51, child: ImageIcon(AssetImage("assets/images/treadmill.png"))), SizedBox(width: 20), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: const [ Text( "EQUIPMENT", style:… Read More Row space between is not separating children

how to set icon button's splash radius based on it's parent widget height in flutter

I have created a customTextfield and placed IconButton as suffix icon, here when I tap on icon button, its splash radius showing bigger than textfield, here I want to fix height of splash radius based on it’s parent.. like if it is inside of container of 100height..it must be set according to it… here is… Read More how to set icon button's splash radius based on it's parent widget height in flutter

appbar icons aren't being effected by the themedata

I’m trying to set up the themedata for my app and i can’t get the color of the icons in the app bar to change. import ‘package:flutter/material.dart’; void main() { runApp( const MyApp(), ); } class MyApp extends StatelessWidget { const MyApp({super.key}); static const primaryColor = Color(0xFF0A0E21); @override Widget build(BuildContext context) { return MaterialApp( theme:… Read More appbar icons aren't being effected by the themedata

When clicking on the card in Flutter, I want to give a border color and the card can be selected

Container( height: 80, width: 80, child: Card( color: Color.fromARGB(255, 19, 85, 144), child: Center( child: Text( widget.title, style: GoogleFonts.poppins( color: Colors.white, fontSize: 20, fontWeight: FontWeight.bold), )), ), For example, when the card number 9 is clicked, as in the image, I want a red border around it. >Solution : first, declare a boolean variable at… Read More When clicking on the card in Flutter, I want to give a border color and the card can be selected

Flutter – Extended floating popup in bottomBarNavigation

How to make Extended floating popup in bottomBarNavigation, like in this image >Solution : You can achieve this with BottomNavigationBar: BottomNavigationBar( type: BottomNavigationBarType.fixed, currentIndex: 0, items: [ new BottomNavigationBarItem( icon: new Icon(Icons.add), label: "Home", ), new BottomNavigationBarItem( icon: new Icon(Icons.add), label: "Publish", ), new BottomNavigationBarItem( icon: new Icon(Icons.delete), label: "Profile", ) ], onTap: (index) {… Read More Flutter – Extended floating popup in bottomBarNavigation