我正在开发一个颤振应用程序。我最近转移到 macOS,从那时起就无法运行该应用程序。其他应用程序运行良好,因此我认为错误出在该应用程序的代码中。也许由于同样的原因,我无法进行构建。
\n这是输出flutter doctor
:
[\xe2\x9c\x93] Flutter (Channel stable, 1.20.1, on Mac OS X 10.15.6 19G73, locale en-US)\n \xe2\x80\xa2 Flutter version 1.20.1 at /Users/bhawna/dev/flutter\n \xe2\x80\xa2 Framework revision 2ae34518b8 (4 days ago), 2020-08-05 19:53:19 -0700\n \xe2\x80\xa2 Engine revision c8e3b94853\n \xe2\x80\xa2 Dart version 2.9.0\n\n[\xe2\x9c\x97] Android toolchain - develop for Android devices\n \xe2\x9c\x97 Unable to locate Android SDK.\n Install Android Studio from: https://developer.android.com/studio/index.html\n On first launch it will assist you in installing the Android SDK components.\n (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for …
Run Code Online (Sandbox Code Playgroud) 我正在尝试制作一个用户界面,其中容器内有一些文本字段,并且有一些图标按钮始终保留在底部。
\n\n这是代码最小代码
\n\nCenter(\n child: Container(\n // width: 1006,\n constraints: BoxConstraints(\n maxWidth: 1006,\n maxHeight: sizingInformation.screenSize.height,\n ),\n margin: EdgeInsets.only(\n left: isMobile ? 0 : 34,\n ),\n child: Flex(\n direction: Axis.vertical,\n mainAxisAlignment: MainAxisAlignment.spaceBetween,\n Flex(\n // rest of the widgets\n ),\n Expanded(\n child: Container(\n padding: EdgeInsets.all(isMobile ? 15 : 34),\n margin: EdgeInsets.only(\n top: isMobile ? 15 : 27,\n ),\n constraints: BoxConstraints(\n maxWidth: 1006,\n ),\n height: 750,\n decoration: BoxDecoration(\n color: CARD_DARK_PURPLE,\n borderRadius: BorderRadius.circular(8),\n ),\n child: SingleChildScrollView(\n physics: AlwaysScrollableScrollPhysics(),\n child: Wrap(\n direction: Axis.horizontal,\n children: …
Run Code Online (Sandbox Code Playgroud) 我正在尝试在 flutter web 中设置 firebase 通知。我遵循了这篇中等文章,并且能够进行基本设置。但是当用户单击允许授予权限时,我收到此错误。
Expected a value of type 'FirebaseError', but got one of type 'DomException'
这是我的index.html
文件
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="Lorem ipsum">
<meta name="robots" content="noindex">
<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Flutter web notifications">
<meta id="flutterweb-theme" name="theme-color" content="#393557">
<link rel="icon" type="image/png" href="/icons/Icon-192.png">
<link rel="apple-touch-icon" href="/icons/Icon-192.png">
<title>Flutter web notifications</title>
<link rel="manifest" href="./manifest.json">
</head>
<body id="app-container">
<!-- This script …
Run Code Online (Sandbox Code Playgroud) 我正在开发一个需要从 firebase 身份验证中删除用户的应用程序。到目前为止,当提供商是 Google 时,我已经能够实现此功能。但我无法为苹果做同样的事情。
这是删除用户的函数:
deleteAccount() async {
setState(() {
_deleteAccountLoader = true;
});
FirestoreFunctions _firestoreFunctions = FirestoreFunctions();
final FirebaseUser currentUser = await _firebaseAuth.currentUser();
await _firestoreFunctions.deleteUser(
email: bloc.getUser().email,
);
SharedPreferences prefs = await SharedPreferences.getInstance();
try {
String accountType = prefs.getString('account_type');
String accessToken = prefs.getString('accessToken') ?? '';
String idToken = prefs.getString('idToken') ?? '';
AuthCredential credential;
switch (accountType) {
case 'google':
credential = GoogleAuthProvider.getCredential(
accessToken: accessToken,
idToken: idToken,
);
break;
case 'apple':
final OAuthProvider oAuthProvider =
new OAuthProvider(providerId: "apple.com");
credential = …
Run Code Online (Sandbox Code Playgroud) 我有另一个开发人员编写的代码片段
$date = DateTime::createFromFormat('U.u', microtime(TRUE));
$dateMicro = $date->format('Y-m-d H:i:s.u');
Run Code Online (Sandbox Code Playgroud)
它抛出这个错误:
错误:调用 bool 上的成员函数 format()
我猜这可能意味着 createFromFormat 返回 false,但我不明白它为什么这样做。
这可能是什么原因造成的?
感谢您的时间!