Bottom Sheet Widget in Flutter | Flutter Complete Crash Course | Flutter Widgets | 30DaysOfFlutter
ฝัง
- เผยแพร่เมื่อ 4 ก.พ. 2025
- #flutter #bottomsheet #flutterwidgets #flutterui
Code - github.com/akm...
Telegram Channel- t.me/akshitmadan
Instagram- / akshitmadan. .
LinkedIn- / akshit-ma. .
Books for Reference -
Hands on Flutter Complete Guide - amzn.to/30Yskc1
The greatest Flutter lectures on youtube
love from nepal bro🇳🇵❣️
Dude you are great
Thank U very very much bro , now I resolved my issue by watching 2 min of your video I subscribed your channel Lots of love
Waiting for the next video!!!
Thank you
Good video
Good
Hope you give reply to me
Can u change the color of icon inside the modalBottomSheet using inkwell
Scaffold
--- body
---Card(gesture detector ----- ontap)(print("outer")
--- ModalBottomSheet
--- Inkwell(ontap icon color should change)(print("inner")
Terminal
outer
inner
outer
then color is changing
class MyStatelessWidget extends StatefulWidget {
MyStatelessWidget({
Key? key,
}) : super(key: key);
@override
State createState() => _MyStatelessWidgetState();
}
bool isFavorite = false;
class _MyStatelessWidgetState extends State {
@override
Widget build(BuildContext context) {
return Center(
child: GestureDetector(
onTap: () {
showModalBottomSheet(
context: context,
builder: (BuildContext context) {
return Container(
height: 200,
// color: Colors.amber,
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
// bottomlisttile(isFavorite: isFavorite, name: "")
GestureDetector(
onTap: () {
setState(() {
isFavorite = !isFavorite;
});
},
child: new ListTile(
// trailing: InkWell(
// child: Icon(Icons.share),
// ),
trailing: isFavorite
? Icon(
Icons.favorite,
color: Colors.yellow
)
: Icon(Icons.favorite),
title: new Text('Your Text',
style: new TextStyle(
fontWeight: FontWeight.bold, fontSize: 14.0)),
),
),
],
),
),
);
},
);
},
child: Container(
height: MediaQuery.of(context).size.height / 4,
width: MediaQuery.of(context).size.width,
child: Card(
child: Image.network(
'placeimg.com/640/480/any',
fit: BoxFit.fill,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
elevation: 5,
margin: EdgeInsets.all(10),
),
),
),
);
}}