Code Monkey home page Code Monkey logo

flutterdouban's Introduction

Hi, I'm kaina404 🔥

For All



Github

flutterdouban's People

Contributors

kaina404 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutterdouban's Issues

首页卡顿

打开app后出现的第一页动态和推荐两个tab,第一次切换的时候略有卡顿,不知如何解决,望大佬分析一波

项目启动不起来

Compiler message:
file:///Users/**/.pub-cache/hosted/pub.flutter-io.cn/palette_generator-0.1.1/lib/palette_generator.dart:188:29: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.

  • 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Users/**/Documents/flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
  • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///Users/wujie/Documents/flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
    stream.removeListener(imageListener);

项目运行报错

企业微信截图_87fa2356-471d-41e5-bfc1-b3120e322e68

小白刚刚开始学习,我这个报错是因为sdk版本(1.5.4-hotfix.2)有问题么?怎么解决啊? @kaina404

项目报错

image
项目down下来,就报错,这是怎么回事

跑不了

可能是我不会操作
运行 flutter run 提示如下
Compiler message:
lib/widgets/image/cached_network_image.dart:197:38: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.

  • 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///E:/kaifa/flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
  • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///E:/kaifa/flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
    oldImageStream?.removeListener(_handleImageChanged);
    ^
    lib/widgets/image/cached_network_image.dart:198:32: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.
  • 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///E:/kaifa/flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
  • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///E:/kaifa/flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
    _imageStream.addListener(_handleImageChanged);
    ^
    lib/widgets/image/cached_network_image.dart:208:34: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.
  • 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///E:/kaifa/flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
  • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///E:/kaifa/flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
    _imageStream?.removeListener(_handleImageChanged);
    ^
    lib/widgets/image/cached_network_image.dart:463:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.
  • 'StringBuffer' is from 'dart:core'.
  • 'Iterable' is from 'dart:core'.
  • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///E:/kaifa/flutter/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
    informationCollector: (StringBuffer information) {
    ^
    file:///E:/kaifa/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/palette_generator-0.1.1/lib/palette_generator.dart:188:29: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.
  • 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///E:/kaifa/flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
  • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///E:/kaifa/flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
    stream.removeListener(imageListener);
    ^
    file:///E:/kaifa/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/palette_generator-0.1.1/lib/palette_generator.dart:194:31: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.
  • 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///E:/kaifa/flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
  • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///E:/kaifa/flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
    stream.removeListener(imageListener);
    ^
    file:///E:/kaifa/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/palette_generator-0.1.1/lib/palette_generator.dart:201:24: Error: The argument type 'void Function(ImageInfo, bool)' can't be assigned to the parameter type 'ImageStreamListener'.
  • 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart' ('file:///E:/kaifa/flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
  • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart' ('file:///E:/kaifa/flutter/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
    stream.addListener(imageListener);
    ^
    Compiler failed on E:\kaifa\yuanma\FlutterDouBan-master-new\lib/main.dart

FAILURE: Build failed with an exception.

  • Where:
    Script 'E:\kaifa\flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 691

  • What went wrong:
    Execution failed for task ':app:compileflutterBuildDebugX86'.

Process 'command 'E:\kaifa\flutter\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to
    get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

启动报错

Compiler message:
lib/widgets/image/cached_network_image.dart:197:38: Error: The argument type 'void Function(ImageInfo, bool)'
can't be assigned to the parameter type 'ImageStreamListener'.

  • 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart'
    ('file:///data/mobile/flutter/packages/flutter/lib/src/painting/image_stream.dart').
  • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart'
    ('file:///data/mobile/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
    oldImageStream?.removeListener(_handleImageChanged);
    ^
    lib/widgets/image/cached_network_image.dart:198:32: Error: The argument type 'void Function(ImageInfo, bool)'
    can't be assigned to the parameter type 'ImageStreamListener'.
  • 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart'
    ('file:///data/mobile/flutter/packages/flutter/lib/src/painting/image_stream.dart').
  • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart'
    ('file:///data/mobile/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
    _imageStream.addListener(_handleImageChanged);
    ^
    lib/widgets/image/cached_network_image.dart:208:34: Error: The argument type 'void Function(ImageInfo, bool)'
    can't be assigned to the parameter type 'ImageStreamListener'.
  • 'ImageInfo' is from 'package:flutter/src/painting/image_stream.dart'
    ('file:///data/mobile/flutter/packages/flutter/lib/src/painting/image_stream.dart').
  • 'ImageStreamListener' is from 'package:flutter/src/painting/image_stream.dart'
    ('file:///data/mobile/flutter/packages/flutter/lib/src/painting/image_stream.dart').
    Try changing the type of the parameter, or casting the argument to 'ImageStreamListener'.
    _imageStream?.removeListener(_handleImageChanged);
    ^
    lib/widgets/image/cached_network_image.dart:463:31: Error: The argument type 'Null Function(StringBuffer)' can't
    be assigned to the parameter type 'Iterable Function()'.
  • 'StringBuffer' is from 'dart:core'.
  • 'Iterable' is from 'dart:core'.
  • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart'
    ('file:///data/mobile/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
    informationCollector: (StringBuffer information) {
    项目启动报错

项目跑不起来 ImageStreamListener

{
"owner": "dart",
"code": "argument_type_not_assignable",
"severity": 8,
"message": "The argument type '(ImageInfo, bool) → void' can't be assigned to the parameter type 'ImageStreamListener'.",
"source": "dart",
"startLineNumber": 197,
"startColumn": 38,
"endLineNumber": 197,
"endColumn": 57,
"tags": []
}

项目启动不起来

Compiler message:
lib/widgets/image/cached_network_image.dart:463:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable Function()'.

  • 'StringBuffer' is from 'dart:core'.
  • 'Iterable' is from 'dart:core'.
  • 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/FlutterSDK/packages/flutter/lib/src/foundation/diagnostics.dart').
    Try changing the type of the parameter, or casting the argument to 'Iterable Function()'.
    informationCollector: (StringBuffer information) {
    ^
    Compiler failed on C:\WorkSpace\Android\FlutterDouBan-master-new\lib\main.dart
    Finished with error: Gradle task assembleDebug failed with exit code 1

随心

老板,你是不是把build什么的文件都上传了,咋会有100M,我下载快哭了

平台是Android Studio3.5.2,运行后是以下提示

build splash
initState _ContainerPageState
build _ContainerPageState
build HomePage
build FlutterTabBarView
_ShopPageWidgetState initState
build widget.url=https://flutterchina.club/
build PersonCenterPage
preferredSize
preferredSize
init state推荐
getContentSliver
initState movie_page
build movie_page
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure object was thrown running a test:
Expected: exactly one matching node in the widget tree
Actual: ?:<zero widgets with text "0" (ignoring offstage widgets)>
Which: means none were found but one was expected

When the exception was thrown, this was the stack:
#4 main. (file:///D:/AndroidStudioProjects/FlutterDouBan-master-new/test/widget_test.dart:19:5)

#5 testWidgets.. (package:flutter_test/src/widget_tester.dart:119:25)

#6 TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:648:19)

#9 TestWidgetsFlutterBinding._runTest (package:flutter_test/src/binding.dart:631:14)
#10 AutomatedTestWidgetsFlutterBinding.runTest. (package:flutter_test/src/binding.dart:1016:24)
#16 AutomatedTestWidgetsFlutterBinding.runTest (package:flutter_test/src/binding.dart:1013:15)
#17 testWidgets. (package:flutter_test/src/widget_tester.dart:116:22)
#18 Declarer.test... (package:test_api/src/backend/declarer.dart:168:27)

#19 Invoker.waitForOutstandingCallbacks. (package:test_api/src/backend/invoker.dart:250:15)

#24 Invoker.waitForOutstandingCallbacks (package:test_api/src/backend/invoker.dart:247:5)
#25 Declarer.test.. (package:test_api/src/backend/declarer.dart:166:33)
#30 Declarer.test. (package:test_api/src/backend/declarer.dart:165:13)

#31 Invoker._onRun.... (package:test_api/src/backend/invoker.dart:400:25)

#45 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:382:19)
#46 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:416:5)
#47 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
(elided 28 frames from class _FakeAsync, package dart:async, package dart:async-patch, and package stack_trace)

This was caught by the test expectation on the following line:
file:///D:/AndroidStudioProjects/FlutterDouBan-master-new/test/widget_test.dart line 19
The test description was:
Counter increments smoke test
════════════════════════════════════════════════════════════════════════════════════════════════════

Test failed. See exception logs above.
The test description was: Counter increments smoke test

然后我就不会搞了

性能问题

小米Note手机,安卓7.0
和原生豆瓣相比,性能明显差很多,Flutter非常卡。我在开发者模式打开gpu监控,发现滑动listview时gpu不调用,原生的会调用。
我自己做的小demo百姓生活+和微信小程序相比也有性能差距。。。
这种性能非常担忧啊,体验差距明显。

Android Studio运行错误

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
More than one file was found with OS independent path 'META-INF/proguard/androidx-annotations.pro'

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 5s
AndroidX incompatibilities may have caused this build to fail.
Please migrate your app to AndroidX. See https://goo.gl/CP92wY.
Finished with error: Gradle task assembleDebug failed with exit code 1

这个错误结果谷歌了半天,答案全是讲解的在 build.gradle 中添加以下代码,但并非针对 flutter 的,操作了也是无效
packagingOptions { exclude 'META-INF/proguard/androidx-annotations.pro' }

iOS 运行报错

/bin/sh: /packages/flutter_tools/bin/xcode_backend.sh: No such file or directory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.