рабочая 5 лаба.3

This commit is contained in:
salih 2024-12-12 11:39:02 +04:00
parent a97454f8bb
commit af324833e6

View File

@ -29,12 +29,11 @@ class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.only(top: MediaQuery
.of(context)
.padding
.top),
child: Column(children: [
return Scaffold(
body: Padding(
padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(12),
child: CupertinoSearchTextField(
@ -51,8 +50,7 @@ class _MyHomePageState extends State<MyHomePage> {
child: Center(
child: FutureBuilder<List<MarketData>?>(
future: data,
builder: (context, snapshot) =>
SingleChildScrollView(
builder: (context, snapshot) => SingleChildScrollView(
child: snapshot.hasData
? Column(
mainAxisAlignment: MainAxisAlignment.center,
@ -71,10 +69,14 @@ class _MyHomePageState extends State<MyHomePage> {
),
),
),
]));
],
),
),
);
}
void _showSnackBar(BuildContext context, String title, bool isLiked) {
WidgetsBinding.instance.addPostFrameCallback((_) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(