Bottom Sheet Widget in Flutter | Flutter Complete Crash Course | Flutter Widgets | 30DaysOfFlutter

preview_player
Показать описание
#flutter #bottomsheet #flutterwidgets #flutterui

Books for Reference -
Рекомендации по теме
Комментарии
Автор

The greatest Flutter lectures on youtube

EkanshSharma-vk
Автор

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

balavardhanreddy
Автор

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<MyStatelessWidget> createState() => _MyStatelessWidgetState();
}

bool isFavorite = false;

class _MyStatelessWidgetState extends State<MyStatelessWidget> {
@override
Widget build(BuildContext context) {
return Center(
child: GestureDetector(
onTap: () {
showModalBottomSheet<void>(
context: context,
builder: (BuildContext context) {
return Container(
height: 200,
// color: Colors.amber,
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
// 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: / 4,
width: MediaQuery.of(context).size.width,
child: Card(
child: Image.network(
fit: BoxFit.fill,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
elevation: 5,
margin: EdgeInsets.all(10),
),
),
),
);
}}

tatakaedattebayo
join shbcf.ru