小编Cod*_*ter的帖子

zsh:找不到命令:颤动

最近我将 Mac OS 更新到最新的 Catalina,我的终端现在使用 zsh 开始显示以下错误:

zsh: command not found: flutter
Run Code Online (Sandbox Code Playgroud)

更新前运行正常。

zsh flutter macos-catalina

45
推荐指数
11
解决办法
5万
查看次数

如何将iOS应用程序从一个开发人员帐户移动到另一个

我有两个不同的苹果开发者帐户,都是公司开发者帐户.我想将一些应用程序切换到另一个帐户.这可能吗?如果是,那么我该怎么做呢.请指导我.

iphone-developer-program ios

42
推荐指数
2
解决办法
4万
查看次数

在flutter应用程序中添加日期选择器的正确方法是什么?

在我的应用中,我正在创建注册页面,我需要在其中添加DOB。我想在其中添加日期选择器,但我没有正确的方法来执行此操作。

android ios flutter dart-2 flutter-layout

35
推荐指数
5
解决办法
3万
查看次数

未处理的异常:在 _ScreenState.initState() 完成之前调用了 inheritFromWidgetOfExactType(_LocalizationsScope) 或 inheritFromElement()

我正在调用初始方法以使用 initState 从 API 加载数据。但这导致我出错。这是错误:

Unhandled Exception: inheritFromWidgetOfExactType(_LocalizationsScope) or inheritFromElement() was called before _ScreenState.initState() completed.
When an inherited widget changes, for example if the value of Theme.of() changes, its dependent widgets are rebuilt. If the dependent widget's reference to the inherited widget is in a constructor or an initState() method, then the rebuilt dependent widget will not reflect the changes in the inherited widget.
Run Code Online (Sandbox Code Playgroud)

我的代码是:

@override
  void initState() {
    super.initState();

    this._getCategories();
  }

  void _getCategories() async {
    AppRoutes.showLoader(context);
    Map<String, dynamic> data …
Run Code Online (Sandbox Code Playgroud)

dart flutter

30
推荐指数
4
解决办法
2万
查看次数

如何更改我的iTunes中显示的公司名称?

问候,希望你们都在那里做得很好.

我想改变我的itunes连接.我想更改其公司名称,以便在有人看到我的应用时显示.

请查看附图以获取更多详细信息.

谢谢,

CP

在此输入图像描述

itunesconnect ios

25
推荐指数
1
解决办法
2万
查看次数

类型 'Future&lt;dynamic&gt;' 不是类型 '() =&gt; void' 的子类型

我正在尝试Text单击打开一个 URL 。为此,我使用InkWell如下所示:

Row(
    mainAxisAlignment: MainAxisAlignment.spaceBetween,
    children: <Widget>[
       Text('${blogModel.timeElapsed} ago'),
       InkWell(
          child: Text('Read'),
          onTap: launchURL(blogModel.url),
       )
     ],
  )
Run Code Online (Sandbox Code Playgroud)

使用这个我收到以下错误:

???????? Exception caught by widgets library ???????????????????????????????????????????????????????
The following assertion was thrown building BlogTileWidget(dirty):
type 'Future<dynamic>' is not a subtype of type '() => void'

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either …
Run Code Online (Sandbox Code Playgroud)

dart flutter flutter-layout

24
推荐指数
2
解决办法
2万
查看次数

如何在iOS 6中以编程方式获取设备的当前方向?

我开发了iOS应用程序并在iOS6设备上进行了测试.在测试时,我意识到我的应用程序没有按预期响应方向更改.

这是我的代码:

// Autorotation (iOS >= 6.0)
- (BOOL) shouldAutorotate
{
    return NO;
}

- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskAll;
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
    return UIInterfaceOrientationMaskPortrait;
}
Run Code Online (Sandbox Code Playgroud)

确切地说,我想知道iOS中的方向更改调用了哪些方法.

iphone screen-orientation device-orientation ipad-3 ios6

20
推荐指数
4
解决办法
6万
查看次数

只能为统一边界提供 borderRadius

使用以下代码时收到警告,但我的应用程序运行良好:

???????? Exception caught by rendering library ?????????????????????????????????????????????????????
The following assertion was thrown during paint():
A borderRadius can only be given for uniform borders.
'package:flutter/src/painting/box_border.dart':
Failed assertion: line 510 pos 12: 'borderRadius == null'
Run Code Online (Sandbox Code Playgroud)

这是我的代码:

           Container(
              height: screenSize.height*.13,
              width: AppSize.medium,
              decoration: BoxDecoration(
                color: Colors.red,
                border: Border(
                  right: BorderSide(
                    width: 1.0,
                    color: Colors.blue
                  ),
                ),
                borderRadius: BorderRadius.only(
                  topRight: Radius.circular(AppSize.small),
                  bottomRight: Radius.circular(AppSize.small),
                )
              ),
            )
Run Code Online (Sandbox Code Playgroud)

dart flutter flutter-layout

13
推荐指数
4
解决办法
9352
查看次数

build_runner 显示错误未为类“ClassDeclaration”定义 getter“macroKeyword”

当我运行 build_runner 命令时,它显示以下错误:

Failed to build build_runner:build_runner:
../../.pub-cache/hosted/pub.dev/dart_style-2.3.5/lib/src/front_end/ast_node_visitor.dart:251:16: Error: The getter 'macroKeyword' isn't defined for the class 'ClassDeclaration'.
  - 'ClassDeclaration' is from 'package:analyzer/src/dart/ast/ast.dart' ('../../.pub-cache/hosted/pub.dev/analyzer-6.2.0/lib/src/dart/ast/ast.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'macroKeyword'.
          node.macroKeyword,
                ^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/dart_style-2.3.5/lib/src/source_visitor.dart:595:19: Error: The getter 'macroKeyword' isn't defined for the class 'ClassDeclaration'.
  - 'ClassDeclaration' is from 'package:analyzer/src/dart/ast/ast.dart' ('../../.pub-cache/hosted/pub.dev/analyzer-6.2.0/lib/src/dart/ast/ast.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named …
Run Code Online (Sandbox Code Playgroud)

dart flutter build-runner

11
推荐指数
3
解决办法
1139
查看次数

如何在没有脚手架的情况下显示snackBar

我试图在我的应用程序中显示小吃店以通知用户,但没有脚手架它会显示我的错误。我目前的代码是:

scaffoldKey.currentState?.showSnackBar(
    new SnackBar(
      backgroundColor: color ?? Colors.red,
      duration: Duration(milliseconds: milliseconds),
      content: Container(
        height: 50.0,
        child: Center(
          child: new Text(
            title,
            style: AppTheme.textStyle.lightText.copyWith(color: Colors.white),
            overflow: TextOverflow.ellipsis,
          ),
        ),
      ),
    ),
  )
Run Code Online (Sandbox Code Playgroud)

dart snackbar flutter flutter-layout

10
推荐指数
3
解决办法
2万
查看次数