leetomlee123 / book Goto Github PK
View Code? Open in Web Editor NEW笔趣阁源基于flutter的小说阅读app
License: Apache License 2.0
笔趣阁源基于flutter的小说阅读app
License: Apache License 2.0
小说分页是如何实现的呢,如何才能知道每页要显示多少个字符,本人新手小白,代码实在看不太懂。
可否简单跟我讲讲。
你好,可以发一份后端源码学习一下吗
调试了一下,发现TextComposition这个类型里面的while循环耗时严重,不知道有没有更好的方案?
服务端开源吗?
修改了entity HotBook.dart 对象属性之后 重新生成HotBook.g.dart
发现build_runner被注释,尝试使用原版本build报错
flutter pub run build_runner build --delete-conflicting-outputs
[INFO] Generating build script...
[INFO] Generating build script completed, took 787ms
[WARNING] Deleted previous snapshot due to missing asset graph.
[INFO] Creating build script snapshot......
[INFO] Creating build script snapshot... completed, took 15.9s
[INFO] There was output on stdout while compiling the build script snapshot, run with `--verbose` to see it (you will need to run a `clean` first to re-snapshot).
[INFO] Initializing inputs
[INFO] Building new asset graph...
[INFO] Building new asset graph completed, took 975ms
[INFO] Checking for unexpected pre-existing outputs....
[INFO] Deleting 17 declared outputs which already existed on disk.
[INFO] Checking for unexpected pre-existing outputs. completed, took 6ms
[INFO] Running build...
[INFO] 1.2s elapsed, 11/26 actions completed.
[SEVERE] json_serializable:json_serializable on lib/entity/ReadPage.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/ReadPage.dart:7:7
╷
7 │ class ReadPage {
│ ^^^^^^^^
╵
[SEVERE] json_serializable:json_serializable on lib/entity/GBook.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/GBook.dart:6:7
╷
6 │ class GBook {
│ ^^^^^
╵
[SEVERE] json_serializable:json_serializable on lib/entity/ChapterList.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/ChapterList.dart:7:7
╷
7 │ class ChapterList {
│ ^^^^^^^^^^^
╵
[SEVERE] json_serializable:json_serializable on lib/entity/TextLine.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/TextLine.dart:6:7
╷
6 │ class TextLine {
│ ^^^^^^^^
╵
[SEVERE] json_serializable:json_serializable on lib/entity/BookVotec.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/BookVotec.dart:4:7
╷
4 │ class BookVotec {
│ ^^^^^^^^^
╵
[SEVERE] json_serializable:json_serializable on lib/entity/BookTag.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/BookTag.dart:6:7
╷
6 │ class BookTag {
│ ^^^^^^^
╵
[SEVERE] json_serializable:json_serializable on lib/entity/DetailVO.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/DetailVO.dart:6:7
╷
6 │ class DetailVO {
│ ^^^^^^^^
╵
[SEVERE] json_serializable:json_serializable on lib/entity/Info.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/Info.dart:6:7
╷
6 │ class Info {
│ ^^^^
╵
[SEVERE] json_serializable:json_serializable on lib/entity/BookInfo.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/BookInfo.dart:8:7
╷
8 │ class BookInfo {
│ ^^^^^^^^
╵
[SEVERE] json_serializable:json_serializable on lib/entity/Chapter.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/Chapter.dart:6:7
╷
6 │ class Chapter {
│ ^^^^^^^
╵
[SEVERE] json_serializable:json_serializable on lib/entity/TopBook.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/TopBook.dart:6:7
╷
6 │ class TopBooks {
│ ^^^^^^^^
╵
[SEVERE] json_serializable:json_serializable on lib/entity/Book.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/Book.dart:6:7
╷
6 │ class Book {
│ ^^^^
╵
[SEVERE] json_serializable:json_serializable on lib/entity/ParseContentConfig.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/ParseContentConfig.dart:6:7
╷
6 │ class ParseContentConfig {
│ ^^^^^^^^^^^^^^^^^^
╵
[SEVERE] json_serializable:json_serializable on lib/entity/SearchItem.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/SearchItem.dart:6:7
╷
6 │ class SearchItem {
│ ^^^^^^^^^^
╵
[SEVERE] json_serializable:json_serializable on lib/entity/HotBook.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/HotBook.dart:6:7
╷
6 │ class HotBook {
│ ^^^^^^^
╵
[SEVERE] json_serializable:json_serializable on lib/entity/TextPage.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/TextPage.dart:7:7
╷
7 │ class TextPage {
│ ^^^^^^^^
╵
[SEVERE] json_serializable:json_serializable on lib/entity/TopResult.dart:
Generator cannot target libraries that have not been migrated to null-safety.
package:book/entity/TopResult.dart:7:7
╷
7 │ class TopResult {
│ ^^^^^^^^^
╵
[INFO] Running build completed, took 2.7s
[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 67ms
[SEVERE] Failed after 2.8s
那我升版本或者降到无null safety版本 之后再运行build报错
Failed to build build_runner:build_runner:
/usr/local/flutter/.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.41.2/lib/src/error/best_practices_verifier.dart:258:50: Error: The property 'displayString' is defined in multiple extensions for 'TargetKind' and neither is more specific.
- 'TargetKind' is from 'package:meta/meta_meta.dart' ('/usr/local/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.7.0/lib/meta_meta.dart').
Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.
var kindNames = kinds.map((kind) => kind.displayString).toList()
^^^^^^^^^^^^^
/usr/local/flutter/.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.41.2/lib/src/error/best_practices_verifier.dart:1950:14: Context: This is one of the extension members.
String get displayString {
^^^^^^^^^^^^^
/usr/local/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.7.0/lib/meta_meta.dart:91:14: Context: This is one of the extension members.
String get displayString {
^^^^^^^^^^^^^
/usr/local/flutter/.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.41.2/lib/src/error/best_practices_verifier.dart:260:36: Error: The getter 'commaSeparatedWithOr' isn't defined for the class 'List<dynamic>'.
- 'List' is from 'dart:core'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'commaSeparatedWithOr'.
var validKinds = kindNames.commaSeparatedWithOr;
^^^^^^^^^^^^^^^^^^^^
�请问有没有保持版本可以编译通过的办法
flutter pub outdated --mode=null-safety
Showing dependencies that are currently not opted in to null-safety.
[✗] indicates versions without null safety support.
[✓] indicates versions opting in to null safety.
Package Name Current Upgradable Resolvable Latest
direct dependencies:
flutter_statusbar_manager ✗2.0.0 (git) ✗2.0.0 (git) ✗2.0.0 (git) ✗2.0.0 (git)
flutter_swiper ✗1.1.6 ✗1.1.6 ✗1.1.6 ✗1.1.6
dev_dependencies:
build_runner ✗1.12.2 ✗1.12.2 ✓2.1.5 ✓2.1.5
或者如果要升级到null-safety的话 flutter_statusbar_manager flutter_swiper
这两个package又好像没办法直接升 有办法吗
现在一直是连接超时,难道大佬不做了吗?
考虑长期,目录页和内容页保存到本地文件形式好些。
🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂🐂
chapter.proto文件能不能给个schema,章节数据都从这个来
flutter pub get in 2.5.2
请问我应该选什么版本
出一个部署教程?
dart --version
Dart SDK version: 2.12.4 (stable) (Thu Apr 15 12:26:53 2021 +0200) on "macos_x64"
judgerhu@hujiajundeMac-mini book % flutter pub get
Resolving dependencies...
The lower bound of "sdk: '>=2.10.0 <3.0.0'" must be 2.12.0'
or higher to enable null safety.
The current Dart SDK (3.1.5) only supports null safety.
这种方式的翻页TextPainter有性能问题,你给TextSpan指定下fontFamily会流畅非常多。
上下和滑动切换时页面会跳,比如我看到第二页换个模式会突然跳到第三页或者第二页
error: Target of URI doesn't exist: 'package:fluro/lib/fluro.dart'. (uri_does_not_exist at [book] lib/main.dart:16)
可以加个仿真翻页
进入软件后如图,显示连接超时,试着挂了梯但没什么效果,请问这种情况是怎么回事?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.