flutter : can't set Border Radius for container and on Tap not work in flutter
1,014
Please try with this
InkWell(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
color: Colors.grey,
),
padding: const EdgeInsets.all(10),
child: const Text("فلسفه",
style: TextStyle(
color: Color(0xFF201F1E),
),
textAlign: TextAlign.center),
),
onTap: () {
print("something");
},
)
output:
Author by
siitaw
Updated on December 31, 2022Comments
-
siitaw over 1 year
I Have Problem about borderRadius of Container in flutter . I can't set it for container
I want to create something like this image :
and other problem about onTap() . ontap not work and i don't know why .
here this is part of my code:
InkWell( borderRadius: BorderRadius.all(Radius.circular(5.0)), child: Container( padding: const EdgeInsets.all(10), child: const Text("فلسفه", style: TextStyle( color: Color(0xFF201F1E), ), textAlign: TextAlign.center), color: greyColor, ), onTap: () { print("something"); }, ),
can any one help me please?
-
siitaw over 2 yearswhen I've put this in container T I've get error in emulator
-
Ardeshir ojan over 2 years@faezehajimohammadhoseini what was your error?
-
Ardeshir ojan over 2 yearsoh I get it if you define decoration and box decoration you should define color inside the box decoration
-
Jahidul Islam over 2 yearsonTap working on my emulator. what about the response you got?
-
siitaw over 2 yearswhen I've click on items ,I've get nothing