Skip to content
This repository has been archived by the owner on Sep 17, 2022. It is now read-only.

Commit

Permalink
修改点有的没的
Browse files Browse the repository at this point in the history
  • Loading branch information
hanerx committed Sep 28, 2020
1 parent 1ff5345 commit e2166da
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/http/http.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class CustomHttp {
}

Future<Response<T>> login<T>(String username, String password) {
print("class: http, action: login, url: 'https://i.dmzj.com/api/login?callback=&nickname=$username&password=$password&type=1'");
return unCachedDio.get(
'https://i.dmzj.com/api/login?callback=&nickname=$username&password=$password&type=1');
}
Expand Down
23 changes: 23 additions & 0 deletions lib/view/comic_viewer.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutterdmzj/component/CustomDrawer.dart';
import 'package:flutterdmzj/component/comic_viewer/ComicPage.dart';
import 'package:flutterdmzj/component/comic_viewer/HorizontalPageView.dart';
Expand Down Expand Up @@ -41,6 +42,14 @@ class _ComicViewPage extends State<ComicViewPage>
_dataBase = DataBase();
_tabController = TabController(length: 2, vsync: this);
init();
SystemChrome.setEnabledSystemUIOverlays([]);
}

@override
void dispose() {
SystemChrome.setEnabledSystemUIOverlays(
[SystemUiOverlay.top, SystemUiOverlay.bottom]);
super.dispose();
}

init() async {
Expand Down Expand Up @@ -99,6 +108,13 @@ class _ComicViewPage extends State<ComicViewPage>
onTop: Provider.of<ComicModel>(context).previousChapter,
debug: debug,
hitBox: hitBox,
onPageChange: (index){
SystemChrome.setEnabledSystemUIOverlays([]);
},
onTap: (index){
SystemChrome.setEnabledSystemUIOverlays(
[SystemUiOverlay.top, SystemUiOverlay.bottom]);
},
);
} else {
return VerticalPageView(
Expand All @@ -114,6 +130,13 @@ class _ComicViewPage extends State<ComicViewPage>
debug: debug,
hitBox: hitBox,
range: range,
onPageChange: (index){
SystemChrome.setEnabledSystemUIOverlays([]);
},
onTap: (index){
SystemChrome.setEnabledSystemUIOverlays(
[SystemUiOverlay.top, SystemUiOverlay.bottom]);
},
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: A 3rd-party dmzj application powered by flutter
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.1.1+12
version: 1.2.1+13

environment:
sdk: ">=2.2.2 <3.0.0"
Expand Down

0 comments on commit e2166da

Please sign in to comment.