Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Notsfsssf committed Jul 15, 2020
1 parent 6beff69 commit 159ea07
Show file tree
Hide file tree
Showing 26 changed files with 486 additions and 352 deletions.
2 changes: 1 addition & 1 deletion .flutter-plugins-dependencies

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ buildscript {
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url "https://jitpack.io" }
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.android.tools.build:gradle:3.6.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

Expand All @@ -38,6 +39,7 @@ allprojects {
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url "https://jitpack.io" }
mavenCentral()
}
}

Expand Down
4 changes: 2 additions & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Jul 12 15:00:58 CST 2020
#Wed Jul 15 21:07:33 CST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
2 changes: 1 addition & 1 deletion lib/component/illust_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import 'package:pixez/page/picture/picture_list_page.dart';
class IllustCard extends StatefulWidget {
final IllustStore store;
final List<IllustStore> iStores;
bool needToBan;
final bool needToBan;
IllustCard({
@required this.store,
this.iStores,
Expand Down
5 changes: 3 additions & 2 deletions lib/component/selectable_html.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:pixez/generated/l10n.dart';
import 'package:share/share.dart';
import 'package:url_launcher/url_launcher.dart';

Expand All @@ -34,15 +35,15 @@ class _SelectableHtmlState extends State<SelectableHtml> {
Widget build(BuildContext context) {
return InkWell(
onLongPress: () async {
final result = await showDialog(
await showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: Text("长按复制"),
content: SelectableText(widget.data ?? ""),
actions: <Widget>[
FlatButton(
child: Text("OK"),
child: Text(I18n.of(context).OK),
onPressed: () {
Navigator.of(context).pop("OK");
},
Expand Down
2 changes: 0 additions & 2 deletions lib/component/spotlight_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ class SpotlightCard extends StatelessWidget {
padding: EdgeInsets.all(4.0),
child: GestureDetector(
onTap: () async {
print(spotlight.articleUrl);
// final int result = await platform.invokeMethod('getBatteryLevel');
Navigator.of(context)
.push(MaterialPageRoute(builder: (BuildContext context) {
return SoupPage(url: spotlight.articleUrl, spotlight: spotlight);
Expand Down
42 changes: 21 additions & 21 deletions lib/component/star_icon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,35 +94,35 @@ class _StarIconState extends State<StarIcon> {
}
return result;
} else {}
return false;
}

@override
Widget build(BuildContext context) {
return Container(
width: 36,
child: LikeButton(
size: 24,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
circleColor:
CircleColor(start: Colors.transparent, end: Colors.red),
bubblesColor: BubblesColor(
dotPrimaryColor: Colors.red,
dotSecondaryColor: Colors.redAccent,
),
isLiked: widget.illustStore.isBookmark,
likeBuilder: (context) {
return Icon(
widget.illustStore.isBookmark
? Icons.favorite
: Icons.favorite_border,
color: widget.illustStore.isBookmark ? Colors.red : Colors.grey,
);
},
onTap: (v) {
return widget.illustStore.star();
},
size: 24,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
circleColor: CircleColor(start: Colors.transparent, end: Colors.red),
bubblesColor: BubblesColor(
dotPrimaryColor: Colors.red,
dotSecondaryColor: Colors.redAccent,
),
isLiked: widget.illustStore.isBookmark,
likeBuilder: (context) {
return Icon(
widget.illustStore.isBookmark
? Icons.favorite
: Icons.favorite_border,
color: widget.illustStore.isBookmark ? Colors.red : Colors.grey,
);
},
onTap: (v) {
return widget.illustStore.star();
},
),
);
}
}
2 changes: 1 addition & 1 deletion lib/network/api_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ApiClient {
"App-Version": "5.0.166",
"Host": BASE_API_URL_HOST
}
..options.connectTimeout = 10000
// ..options.connectTimeout = 10000
..interceptors.add(LogInterceptor(requestBody: true, responseBody: true))
..interceptors.add(RefreshTokenInterceptor());
(httpClient.httpClientAdapter as DefaultHttpClientAdapter)
Expand Down
1 change: 0 additions & 1 deletion lib/page/Init/init_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
import 'package:pixez/main.dart';
import 'package:pixez/network/api_client.dart';
import 'package:pixez/page/hello/android_hello_page.dart';
import 'package:shared_preferences/shared_preferences.dart';

Expand Down
Loading

0 comments on commit 159ea07

Please sign in to comment.