同步文件

This commit is contained in:
sanfan.hx
2019-02-20 14:43:49 +08:00
parent ef0b12e598
commit b4995f9993
5 changed files with 21 additions and 10 deletions

View File

@ -279,7 +279,7 @@ void delete(String path) {
### 库的引用
flutter go 中导入lib下文件库统一指定名,避免过多的```../../```
flutter go 中导入lib下文件库统一指定名,避免过多的```../../```
```
package:flutter_go/
```

View File

@ -1,6 +1,8 @@
## Flutter Go
> Help developers get started quickly Flutter **In-house testing, the 1.0 official version will be released on February 20.**
![https://img.alicdn.com/tfs/TB1OJkeHNYaK1RjSZFnXXa80pXa-229-229.png](https://img.alicdn.com/tfs/TB1OJkeHNYaK1RjSZFnXXa80pXa-229-229.png)
> Help developers get started quickly Flutter **Flutter Go 1.0 Android has been released**
## Download URL

View File

@ -1,7 +1,9 @@
Language: [English](https://github.com/alibaba/flutter-go/blob/master/README-en.md) | [中文简体](https://github.com/alibaba/flutter-go/blob/master/README.md)
## Flutter Go
> 帮助开发者快速上手 Flutter **内部测试中1.0 正式版将于 2月 20日 发布。**
![https://img.alicdn.com/tfs/TB1OJkeHNYaK1RjSZFnXXa80pXa-229-229.png](https://img.alicdn.com/tfs/TB1OJkeHNYaK1RjSZFnXXa80pXa-229-229.png)
> 帮助开发者快速上手 Flutter **Flutter Go 1.0 Android版已正式发布**
## 版本更新历史
> 按时间顺序,展示重要的提交更新内容。
@ -17,7 +19,7 @@ Language: [English](https://github.com/alibaba/flutter-go/blob/master/README-en.
android下载地址:
<img src="https://img.alicdn.com/tfs/TB1Hy1FEzDpK1RjSZFrXXa78VXa-386-384.png" width="200px">
<img src="https://img.alicdn.com/tfs/TB18aj7HQvoK1RjSZFNXXcxMVXa-486-490.png" width="200px">
iphone下载地址:
暂无

View File

@ -8,7 +8,7 @@ import 'package:flutter_go/utils/provider.dart';
import 'package:flutter_go/utils/shared_preferences.dart';
import 'package:flutter_go/views/first_page/home.dart';
import 'package:flutter_go/model/search_history.dart';
import 'views/welcome_page/index.dart';
//import 'views/welcome_page/index.dart';
const int ThemeColor = 0xFFC91B3A;
SpUtil sp;
@ -17,7 +17,9 @@ var db;
class MyApp extends StatelessWidget {
MyApp() {
final router = new Router();
Routes.configureRoutes(router);
Application.router = router;
}
showWelcomePage() {
@ -32,7 +34,6 @@ class MyApp extends StatelessWidget {
}
@override
Widget build(BuildContext context) {
showWelcomePage();
return new MaterialApp(
title: 'title',
theme: new ThemeData(

View File

@ -1,7 +1,6 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_go/views/fourth_page/page_dragger.dart';
import 'package:flutter_go/views/fourth_page/page_reveal.dart';
import 'package:flutter_go/views/fourth_page/pager_indicator.dart';
@ -19,13 +18,15 @@ class FourthPageState extends State<FourthPage> with TickerProviderStateMixin {
int activeIndex = 0;
SlideDirection slideDirection = SlideDirection.none;
int nextPageIndex = 0;
int waitingNextPageIndex = -1;
double slidePercent = 0.0;
FourthPageState() {
slideUpdateStream = new StreamController<SlideUpdate>();
slideUpdateStream.stream.listen((SlideUpdate event) {
if(mounted) {
if (mounted) {
setState(() {
if (event.updateType == UpdateType.dragging) {
slideDirection = event.direction;
@ -56,7 +57,7 @@ class FourthPageState extends State<FourthPage> with TickerProviderStateMixin {
vsync: this,
);
nextPageIndex = activeIndex;
waitingNextPageIndex = activeIndex;
}
animatedPageDragger.run();
@ -64,7 +65,12 @@ class FourthPageState extends State<FourthPage> with TickerProviderStateMixin {
slideDirection = event.direction;
slidePercent = event.slidePercent;
} else if (event.updateType == UpdateType.doneAnimating) {
activeIndex = nextPageIndex;
if (waitingNextPageIndex != -1) {
nextPageIndex = waitingNextPageIndex;
waitingNextPageIndex = -1;
} else {
activeIndex = nextPageIndex;
}
slideDirection = SlideDirection.none;
slidePercent = 0.0;