mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-07-02 21:48:54 +08:00
同步文件
This commit is contained in:
@ -279,7 +279,7 @@ void delete(String path) {
|
|||||||
|
|
||||||
### 库的引用
|
### 库的引用
|
||||||
|
|
||||||
flutter go 中,导入lib下文件库,统一指定报名,避免过多的```../../```
|
flutter go 中,导入lib下文件库,统一指定包名,避免过多的```../../```
|
||||||
```
|
```
|
||||||
package:flutter_go/
|
package:flutter_go/
|
||||||
```
|
```
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
## Flutter Go
|
## Flutter Go
|
||||||
|
|
||||||
> Help developers get started quickly Flutter **In-house testing, the 1.0 official version will be released on February 20.**
|

|
||||||
|
|
||||||
|
> Help developers get started quickly Flutter **Flutter Go 1.0 Android has been released**
|
||||||
|
|
||||||
|
|
||||||
## Download URL
|
## Download URL
|
||||||
|
@ -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)
|
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 Go
|
||||||
|
|
||||||
> 帮助开发者快速上手 Flutter **内部测试中,1.0 正式版将于 2月 20日 发布。**
|

|
||||||
|
|
||||||
|
> 帮助开发者快速上手 Flutter **Flutter Go 1.0 Android版已正式发布**
|
||||||
|
|
||||||
## 版本更新历史
|
## 版本更新历史
|
||||||
> 按时间顺序,展示重要的提交更新内容。
|
> 按时间顺序,展示重要的提交更新内容。
|
||||||
@ -17,7 +19,7 @@ Language: [English](https://github.com/alibaba/flutter-go/blob/master/README-en.
|
|||||||
|
|
||||||
android下载地址:
|
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下载地址:
|
iphone下载地址:
|
||||||
暂无
|
暂无
|
||||||
|
@ -8,7 +8,7 @@ import 'package:flutter_go/utils/provider.dart';
|
|||||||
import 'package:flutter_go/utils/shared_preferences.dart';
|
import 'package:flutter_go/utils/shared_preferences.dart';
|
||||||
import 'package:flutter_go/views/first_page/home.dart';
|
import 'package:flutter_go/views/first_page/home.dart';
|
||||||
import 'package:flutter_go/model/search_history.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;
|
const int ThemeColor = 0xFFC91B3A;
|
||||||
SpUtil sp;
|
SpUtil sp;
|
||||||
@ -17,7 +17,9 @@ var db;
|
|||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
MyApp() {
|
MyApp() {
|
||||||
final router = new Router();
|
final router = new Router();
|
||||||
|
|
||||||
Routes.configureRoutes(router);
|
Routes.configureRoutes(router);
|
||||||
|
|
||||||
Application.router = router;
|
Application.router = router;
|
||||||
}
|
}
|
||||||
showWelcomePage() {
|
showWelcomePage() {
|
||||||
@ -32,7 +34,6 @@ class MyApp extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
showWelcomePage();
|
|
||||||
return new MaterialApp(
|
return new MaterialApp(
|
||||||
title: 'title',
|
title: 'title',
|
||||||
theme: new ThemeData(
|
theme: new ThemeData(
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:flutter_go/views/fourth_page/page_dragger.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/page_reveal.dart';
|
||||||
import 'package:flutter_go/views/fourth_page/pager_indicator.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;
|
int activeIndex = 0;
|
||||||
SlideDirection slideDirection = SlideDirection.none;
|
SlideDirection slideDirection = SlideDirection.none;
|
||||||
int nextPageIndex = 0;
|
int nextPageIndex = 0;
|
||||||
|
int waitingNextPageIndex = -1;
|
||||||
|
|
||||||
double slidePercent = 0.0;
|
double slidePercent = 0.0;
|
||||||
|
|
||||||
FourthPageState() {
|
FourthPageState() {
|
||||||
slideUpdateStream = new StreamController<SlideUpdate>();
|
slideUpdateStream = new StreamController<SlideUpdate>();
|
||||||
|
|
||||||
slideUpdateStream.stream.listen((SlideUpdate event) {
|
slideUpdateStream.stream.listen((SlideUpdate event) {
|
||||||
if(mounted) {
|
if (mounted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
if (event.updateType == UpdateType.dragging) {
|
if (event.updateType == UpdateType.dragging) {
|
||||||
slideDirection = event.direction;
|
slideDirection = event.direction;
|
||||||
@ -56,7 +57,7 @@ class FourthPageState extends State<FourthPage> with TickerProviderStateMixin {
|
|||||||
vsync: this,
|
vsync: this,
|
||||||
);
|
);
|
||||||
|
|
||||||
nextPageIndex = activeIndex;
|
waitingNextPageIndex = activeIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
animatedPageDragger.run();
|
animatedPageDragger.run();
|
||||||
@ -64,7 +65,12 @@ class FourthPageState extends State<FourthPage> with TickerProviderStateMixin {
|
|||||||
slideDirection = event.direction;
|
slideDirection = event.direction;
|
||||||
slidePercent = event.slidePercent;
|
slidePercent = event.slidePercent;
|
||||||
} else if (event.updateType == UpdateType.doneAnimating) {
|
} else if (event.updateType == UpdateType.doneAnimating) {
|
||||||
activeIndex = nextPageIndex;
|
if (waitingNextPageIndex != -1) {
|
||||||
|
nextPageIndex = waitingNextPageIndex;
|
||||||
|
waitingNextPageIndex = -1;
|
||||||
|
} else {
|
||||||
|
activeIndex = nextPageIndex;
|
||||||
|
}
|
||||||
|
|
||||||
slideDirection = SlideDirection.none;
|
slideDirection = SlideDirection.none;
|
||||||
slidePercent = 0.0;
|
slidePercent = 0.0;
|
||||||
|
Reference in New Issue
Block a user