小编roz*_*rro的帖子

I/chatty - 控制台输出中有相同的 1 行

当我调试应用程序时,我会进入这样的控制台行,-这是什么意思?

I/chatty (22231): uid=10141(com.githubname.appid) Thread-2 相同 1 行

dart flutter

1
推荐指数
1
解决办法
7977
查看次数

使用 photo_view 包来拟合图像,如 BoxFit.cover

这是基本用法,但在本例中它不适合屏幕边框。是否可以通过 BoxFit.cover 的行为来显示它?双击使其适合屏幕边框。最初可以这样显示吗?

PhotoView(
  imageProvider: NetworkImage(url),
)
Run Code Online (Sandbox Code Playgroud)

flutter photoview

1
推荐指数
1
解决办法
873
查看次数

func关键字后面的两个函数名称 - 它是什么?

如何理解最后的功能?为什么我们在func声明后使用不同的函数名?如何使用这些功能?像main功能中所示使用它是错误的.

package main

import (
    "fmt"
)

func main() {
    fmt.Println(incrementer()) //error
}

func incrementer() func() int { //what is it?!
    i := 0
    return func() int {
        i++
        return i
    }
}
Run Code Online (Sandbox Code Playgroud)

go

0
推荐指数
1
解决办法
73
查看次数

修饰符 async 不能应用于 setter 的主体

hashIt如果编辑器出现此错误,我如何在 setter 中使用函数

修饰符 async 不能应用于 setter 的主体

  Future<String> hashIt(String password) async {
    return await PasswordHash.hashStorage(password);
  }

  set hashPass(String pass) async { // error here
    final hash = await hashIt(pass);
    _hash = hash;
  }
Run Code Online (Sandbox Code Playgroud)

编译器消息: Error: Setters can't use 'async', 'async*', or 'sync*'.

dart

0
推荐指数
1
解决办法
255
查看次数

底部溢出 224 像素的 RenderFlex

如何修复以下错误?

RenderFlex 底部溢出 224 像素。

在列小部件上

@override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Read message'),
      ),
      body: Column( //the error is here
        children: [
          Padding(
            padding: const EdgeInsets.all(20.0).copyWith(bottom: 10),
            child: Row( ...
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

flutter

0
推荐指数
1
解决办法
354
查看次数

Dart 中的单例模式用于创建共享对象

这段代码有什么作用?没有这个功能_sharedInstance(),至少我没有找到。为什么再次使用代码行LoadingScreen._sharedInstance();来定义_shared ?为什么要用factory那里?即这段代码似乎难以理解......

class LoadingScreen {
  LoadingScreen._sharedInstance();
  static final LoadingScreen _shared = LoadingScreen._sharedInstance();
  factory LoadingScreen.instance() => _shared;
  ...
Run Code Online (Sandbox Code Playgroud)

dart flutter

0
推荐指数
1
解决办法
580
查看次数

List.getFirst() 上的编译错误:找不到符号?

您能检测到编译问题吗?它在本地编译没有任何错误。但是,当使用我无法影响的远程自动编码服务编译它时,它会失败。

[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /tmp/builds/autocode_133386/src/main/java/com/classes/ArrayRectangles.java:[76,46] cannot find symbol
  symbol:   method getFirst()
  location: variable perimeters of type java.util.List<java.lang.Double>
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.849 s
[INFO] Finished at: 2024-01-17T07:57:25Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project Classes: Compilation failure
[ERROR] /tmp/builds/autocode_133386/src/main/java/com/classes/ArrayRectangles.java:[76,46] cannot find symbol
[ERROR]   symbol:   method getFirst()
[ERROR]   location: variable perimeters of type java.util.List<java.lang.Double>
Run Code Online (Sandbox Code Playgroud)

我的代码

List<Double> perimeters = new ArrayList<>();
...
double …
Run Code Online (Sandbox Code Playgroud)

java

-3
推荐指数
1
解决办法
902
查看次数

标签 统计

flutter ×4

dart ×3

go ×1

java ×1

photoview ×1