Cupertinotabscaffaffold с черным экраномAndroid

Форум для тех, кто программирует под Android
Ответить
Anonymous
 Cupertinotabscaffaffold с черным экраном

Сообщение Anonymous »

В моем приложении Flutter я пытаюсь использовать Cupertinotabscaffold, но он просто делает весь мой физический эмулятор (Samsung Galaxy S7) черный. черный), < /p>

Код: Выделить всё

import 'package:flutter/cupertino.dart';

/// Flutter code sample for [CupertinoTabBar].

void main() => runApp(const CupertinoTabBarApp());

class CupertinoTabBarApp extends StatelessWidget {
const CupertinoTabBarApp({super.key});

@override
Widget build(BuildContext context) {
return const CupertinoApp(
theme: CupertinoThemeData(brightness: Brightness.light),
home: CupertinoTabBarExample(),
);
}
}

class CupertinoTabBarExample extends StatelessWidget {
const CupertinoTabBarExample({super.key});

@override
Widget build(BuildContext context) {
return CupertinoTabScaffold(
tabBar: CupertinoTabBar(
items: const [
BottomNavigationBarItem(icon: Icon(CupertinoIcons.star_fill), label: 'Favorites'),
BottomNavigationBarItem(icon: Icon(CupertinoIcons.clock_solid), label: 'Recents'),
BottomNavigationBarItem(
icon: Icon(CupertinoIcons.person_alt_circle_fill),
label: 'Contacts',
),
BottomNavigationBarItem(icon: Icon(CupertinoIcons.circle_grid_3x3_fill), label: 'Keypad'),
],
),
tabBuilder: (BuildContext context, int index) {
return CupertinoTabView(
builder: (BuildContext context) {
return Center(child: Text('Content of tab $index'));
},
);
},
);
}
}
Вот выход в Android Studio

Код: Выделить всё

Launching lib/main.dart on SM G930F in debug mode...
Running Gradle task 'assembleDebug'...
✓ Built build/app/outputs/flutter-apk/app-debug.apk
Installing build/app/outputs/flutter-apk/app-debug.apk...
I/flutter (30031): [IMPORTANT:flutter/shell/platform/android/android_context_gl_impeller.cc(94)] Using the Impeller rendering backend (OpenGLES).
Debug service listening on ws://127.0.0.1:39913/7Uznt7dMBl8=/ws
Syncing files to device SM G930F...
I/Choreographer(30031): Skipped 179 frames!  The application may be doing too much work on its main thread.
I/zygote64(30031): Debugger is no longer active
I am using flutter 3.29.0
I don't really ask much questions about app development, so let me know what more information you need and I can add it to the question
I've tried running it on the Android Studio emulator, and it actually does work on that and it gives a correct result as per the image, so I think it's something to do with my physical emulator, I just don't know Что именно.>

Подробнее здесь: https://stackoverflow.com/questions/794 ... ack-screen
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Android»