GithubHelp home page GithubHelp logo

kaina404 / flutterdouban Goto Github PK

View Code? Open in Web Editor NEW
8.6K 144.0 1.8K 155.43 MB

🔥🔥🔥Flutter豆瓣客户端,Awesome Flutter Project,全网最100%还原豆瓣客户端。首页、书影音、小组、市集及个人中心,一个不拉。( https://img.xuvip.top/douyademo.mp4)

Java 0.06% Objective-C 0.13% Dart 99.58% Ruby 0.23%
android dart flutter ios

flutterdouban's Introduction

GitHub stars GitHub forks GitHub issues

SDK Version

kaina404 ~ % flutter --version
Flutter 2.5.3channel stablehttps://github.com/flutter/flutter.git
Frameworkrevision 18116933e7 (4 months ago) • 2021-10-15 10:46:35 -0700
Enginerevision d3ea636dc5
ToolsDart 2.14.4
kaina404 ~ % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.3, on macOS 11.4 20F71 darwin-arm, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.62.3)
[✓] Connected device (3 available)

如果产生其他依赖无法编译的问题,可以尝试将pubspec.yaml中的dependencies中的所有依赖的"^"去掉,重新编译尝试。

真正的豆瓣客户端,90%还原豆瓣。首页、书影音、小组、市集及个人中心,一个不拉。项目持续更新中...

如果您觉得还可以的话,给个Star白~

使用Flutter开发一个豆瓣App

  • 此项目,90%还原某瓣APP,所有UI均按照某瓣来实现。
  • 项目中的数据均来自豆瓣api真实有效数据
  • 项目中用到了几乎所有的Flutter widget
  • 还有两个比较大的自定义魔改源码实现特效
  • 大年初一也在维护的项目

APP中所有数据均为真实数据。但是默认,对于"书影音单个电影tab"的数据,使用模拟数据。因为,频繁的打开关闭APP,会频繁调用 这个接口。接口是有调用限制的,次数过于频繁,会被锁IP。如果想看真实数据,则可以进入 "我的",然后打开"书影音数据来自网络"开关后,重启APP即可。

下载地址

扫一扫下载体验

Demo(刷不出gif图的,耐心等待一会,或者多刷几次。)

demo1

demo1

demo1

demo1

demo1

demo1

demo1

demo1

demo1

demo1

demo1

demo1

dev-open

大家可以向这个分支根据豆瓣UI做设计稿,提交代码

  • 这个分支供广大Flutter开发者来学习Flutter
  • 此分支囊括了Flutter 90%的组件的基本与组合使用,是初学者真正实践的不错选择
  • 在此豆芽APP的首页实现与影片详情的UI特效,基于魔改Flutter源码。有兴趣可以看看
  • 大家想实战自己的Flutter能力,可以将某瓣APP作为设计稿,完成需求,并提交
  • 每位开发者提交的代码,我都会在文档中进行备注

注意!!!建议使用模拟数据(mock_request.dart)

  • 每个接口均有一定的调用限制
  • 大家pull下的代码,进行测试调试时,对于特定接口,返回的特定数据。尽量不要每次求请求一次。可以请求到一次真实数据后,转成json保存 到本地。然后,自己调试开发的时候,使用这个模拟数据即可。 [可参考mock_request.dart]

未来版本计划(欢迎Flutter爱好者前来认领)

欢迎Flutter爱好者共同完成

涉及到UI,可参考豆瓣。

萌新TASK

  • 完成任意一个未实现的按钮
  • 完成任意一个未实现的页面
  • 优化原有Widget
  • 爱好者想实现但是未能实现的需求
  • More ...

进阶TASK

老手TASK

对魔改源码或者喜欢翻源码的童鞋可以看看下面两个

  • 魔改Flutter AppBar源码实现豆瓣头部特效

    魔改Flutter AppBar源码实现豆瓣头部特效

  • 魔改源码实现电影详情抽屉特效(GIF图如果加载不出来,多刷几次)

    抽屉特效1

    抽屉特效2

    抽屉特效3

页面介绍

  • 首页 pages/home

    • homo_app_bar.dart 首页导航头
    • home_page.dart 首页
    • my_home_tab_bar.dart 首页tab
  • 书影音 pages/movie

    • book_audio_video_page.dart 书影音页面
    • detail_page.dart 影片、电视详情页面
    • person_detail_page.dart 演员页面介绍
    • ... 页面都有注释
  • 小组 pages/group

  • 市集 shop_page.dart

    • 市集的数据使用两个webview
  • 我的 page/person

更新记录

  • dev-0.1

    • 魔改源码实现电影详情抽屉特效
    • 魔改Flutter AppBar源码实现豆瓣头部特效
    • 优化页面逻辑
    • 优化加载速度
  • master

    • 基本网络请求框架、UI框架
    • 已经填入了"最为复杂的电影TAB页面"、影视详情页面、小组页面(UI与豆瓣一致,数据使用的是热映榜)
      • 页面上下滑动
      • 页面上下+左右滑动
      • 数据加载
      • TAB页面滑动
      • ....
    • 作为基本版本,一些逻辑不够完善,有一些bug。

默认条约

此项目仅供大家交流沟通使用,不得用于任何商业以及利益活动。由此引起的责任,跟我无关。谢谢!

如果您觉得还可以的话,给个Star白~

Thanks

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

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

启动报错

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) {
    项目启动报错

项目报错

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

随心

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

项目启动不起来

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

首页卡顿

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

iOS 运行报错

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

性能问题

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

项目运行报错

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

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

跑不了

可能是我不会操作
运行 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:
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);

平台是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

然后我就不会搞了

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' }

项目跑不起来 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": []
}

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.