关闭应用程序后,当我再次尝试打开它时,出现以下错误,但仅在 iOS 平台上,Android 运行良好。
我环顾四周,有几个关于这个问题的问题和问题,但我无法解决它。我也在使用bloc
模式来管理状态。
我GlobalKey<FormState>
在我的AuthenticateForm
.
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:low_code/blocs/authentication/authentication_bloc.dart';
import 'package:low_code/blocs/authentication/authentication_event.dart';
import 'package:low_code/helpers/app_localization/app_localizations.dart';
class AuthenticateForm extends StatefulWidget {
@override
_AuthenticateFormState createState() => _AuthenticateFormState();
}
class _AuthenticateFormState extends State<AuthenticateForm> {
GlobalKey<FormState> _formKey = GlobalKey<FormState>();
String username;
String password;
@override
Widget build(BuildContext context) {
AppLocalizations appLocalizations = AppLocalizations.of(context);
return Form(
key: _formKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
TextFormField(
onSaved: (String value) => username = value,
initialValue: 'dms-bpm',
decoration: InputDecoration(
labelText: appLocalizations.translate('username')),
// …
Run Code Online (Sandbox Code Playgroud) 边框半径不适用于子级内部Container
。尝试了SizedBox
&Stack
小部件。我需要容器内的边框视图。
Scaffold(
appBar: AppBar(
title: new Text("ListView"),
),
body: Center(
child: Padding(
padding: EdgeInsets.all(15.0),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0),
border: Border.all(
color: Colors.green,
width: 2.0
)
),
child: Container(
color: Colors.red,
)
),
)
)
)
Run Code Online (Sandbox Code Playgroud)
因此,在我的 AR 应用程序中使用 Firebase 身份验证和存储。完成登录和资产包下载后,我的脚本将用户引导到下一个场景(通过 SceneManager.LoadScene()),在那里他们可以与其内容进行交互。
但是,在场景转换时,此错误会导致在编辑器中以不一致的方式暂停:
“ApplicationException: Auth object 0x7586a0f0 应该在它依赖的 App 0x77b799a0 之前被删除。Firebase.FirebaseApp.ReleaseReferenceInternal (Firebase.FirebaseApp app)(在 Z:/tmp/tmp.n6hJS53AxW/firebase/app/client/unityApp/proxy/Firebase .cs:998) Firebase.FirebaseApp.RemoveReference ()(在 Z:/tmp/tmp.n6hJS53AxW/firebase/app/client/unity/proxy/FirebaseApp.cs:293) Firebase.FirebaseApp.Dispose ()(在 Z: /tmp/tmp.n6hJS53AxW/firebase/app/client/unity/proxy/FirebaseApp.cs:51) Firebase.FirebaseApp.Finalize () (在 Z:/tmp/tmp.n6hJS53AxW/firebase/app/client/unity/proxy /FirebaseApp.cs:47) UnityEngine.UnhandledExceptionHandler:m__0(Object, UnhandledExceptionEventArgs)"
如何在场景转换之前删除我的 Auth 对象?我试过auth.Dispose()
和auth.SignOut()
,没有运气。
unity-game-engine firebase firebase-authentication firebase-storage
我改变了我BottomNavigatorBar
的CupertinoTabBar
,它不会压缩当前的Tab
,
换句话说,我将无法显示当前选项卡底部的一些信息,因为CupertinoTabBar
它会阻止它。
我不知道这是Cupertino
样式的默认行为,但我需要解决它。我尝试用CupertinoTabView
和/或包装我的页面CupertinoPageScaffold
,两者都不起作用。
你有什么建议吗?
这是我的相关代码:
return CupertinoTabScaffold(
tabBar: CupertinoTabBar(currentIndex: 2, items: [
BottomNavigationBarItem(
icon: Icon(Icons.explore), title: Text('Explore')),
BottomNavigationBarItem(
icon: Icon(Icons.card_travel), title: Text('Adventure')),
BottomNavigationBarItem(
icon: Icon(Icons.search), title: Text('Search')),
BottomNavigationBarItem(
icon: Icon(Icons.map), title: Text('Create Tour')),
BottomNavigationBarItem(
icon: Icon(Icons.person), title: Text('Profile')),
]),
tabBuilder: (context, index) {
switch (index) {
case 0:
return CupertinoTabView(
builder: (context) => ExplorePage(),
);
break;
case 1:
return AdventurePage();
break;
case 2:
return CupertinoTabView(
builder: …
Run Code Online (Sandbox Code Playgroud)