-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
При переходе на другой экран через
Navigator.push(
context,
MaterialPageRoute<void>(
builder: (BuildContext context) =>
const SettingsScreen()))
Карта остается на экране, и экран куда переходим не видно.
На Android 10 и выше такого нет.
Как повторить:
из examples берем пример map_objects добавляем кнопку:
SimpleButton(
text:
"На другой экран",
onPressed: () {
Navigator.push(
context,
MaterialPageRoute<void>(
builder: (BuildContext context) =>
const SettingsScreen()));
},
),
Добавляем любой экран
import 'package:flutter/material.dart';
class SettingsScreen extends StatefulWidget {
const SettingsScreen({super.key});
@override
State<SettingsScreen> createState() => _SettingsScreenState();
}
class _SettingsScreenState extends State<SettingsScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text(
'Настройки',
style: TextStyle(color: Colors.white, fontSize: 30),
),
backgroundColor: Colors.blue,
iconTheme: const IconThemeData(
color: Colors.white, size: 40 //change your color here
),
),
body: const Text('Настройки'),
);
}
}
pubspec.yaml - yandex_maps_mapkit: ^4.2.1
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.35.5, on Microsoft Windows [Version 10.0.19045.6332], locale ru-RU)
[√] Windows Version (Windows 10 Pro 64-а, 22H2, 2009)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.16)
[√] Android Studio (version 2025.1.3)
[√] VS Code (version 1.102.2)
[√] Connected device (4 available)
[√] Network resources
• No issues found!
Metadata
Metadata
Assignees
Labels
No labels