You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an issue with the YandexMap widget in Flutter. When navigating back and forth between screens, the map widget sometimes fails to load correctly or appears blank. This problem persists across Android.
I'm encountering an issue with the YandexMap widget in Flutter. When navigating back and forth between screens, the map widget sometimes fails to load correctly or appears blank. This problem persists across Android.
This is my code.
Screen.Recording.2024-10-28.at.22.33.31.mov
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:sott/core/app_text_style.dart';
import 'package:yandex_mapkit/yandex_mapkit.dart';
class YandexExample extends StatefulWidget {
const YandexExample({super.key});
@OverRide
State createState() => _YandexExampleState();
}
class _YandexExampleState extends State {
@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Yandex Example"),
),
body: ListView.builder(
itemCount: 50,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(builder: (context) => const YandexMapPage(),)
);
},
child: Container(
height: 48.h,
color: Colors.red,
alignment: Alignment.center,
margin: EdgeInsets.only(bottom: 20.h),
child: Text("Go to map $index", style: AppTextStyle.medium16,),
),
);
},
),
);
}
}
class YandexMapPage extends StatelessWidget {
const YandexMapPage({super.key});
@OverRide
Widget build(BuildContext context) {
return Scaffold(
body: SizedBox(
height: 192.h,
child: const YandexMap(),
),
);
}
}
The text was updated successfully, but these errors were encountered: