mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-06-23 07:29:43 +08:00
@ -31,7 +31,7 @@ class DisclaimerMsgState extends State<DisclaimerMsg> {
|
||||
var _readed = false;
|
||||
|
||||
//SharedPreferences 存储结果
|
||||
Future<bool> refs(bool value) async {
|
||||
void refs(bool value) async {
|
||||
final SharedPreferences prefs = await _prefs;
|
||||
final bool unKnow = value;
|
||||
setState(() {
|
||||
|
@ -46,14 +46,14 @@ class PagerIndicator extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
final BUBBLE_WIDHT = 55.0 ;
|
||||
final baseTranslation = ((viewModel.pages.length * BUBBLE_WIDHT) / 2) - (BUBBLE_WIDHT / 2) ;
|
||||
var translation = baseTranslation - (viewModel.activeIndex * BUBBLE_WIDHT);
|
||||
final bubbleWidth = 55.0 ;
|
||||
final baseTranslation = ((viewModel.pages.length * bubbleWidth) / 2) - (bubbleWidth / 2) ;
|
||||
var translation = baseTranslation - (viewModel.activeIndex * bubbleWidth);
|
||||
|
||||
if (viewModel.slideDirection == SlideDirection.leftToRight){
|
||||
translation += BUBBLE_WIDHT * viewModel.slidePercent;
|
||||
translation = bubbleWidth * viewModel.slidePercent + translation;
|
||||
}else if (viewModel.slideDirection == SlideDirection.rightToLeft){
|
||||
translation -= BUBBLE_WIDHT * viewModel.slidePercent;
|
||||
translation = bubbleWidth * viewModel.slidePercent - translation;
|
||||
}
|
||||
|
||||
return new Column(
|
||||
|
@ -38,7 +38,6 @@ class FirstPageState extends State<FirstPage> with AutomaticKeepAliveClientMixin
|
||||
* 判断是否需要弹出免责声明,已经勾选过不在显示,就不会主动弹
|
||||
*/
|
||||
_unKnow.then((bool value) {
|
||||
print("==========FirstPageState========_unKnow========${value}");
|
||||
new Future.delayed(const Duration(seconds: 1),(){
|
||||
if (!value) {
|
||||
key.currentState.showAlertDialog(context);
|
||||
|
@ -73,6 +73,12 @@ class FourthPageState extends State<FourthPage> with TickerProviderStateMixin {
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
slideUpdateStream.close();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return new Stack(
|
||||
|
@ -26,7 +26,7 @@ class CupertinoAppFullDefault extends StatefulWidget {
|
||||
* */
|
||||
class _CupertinoAppFullDefault extends State {
|
||||
|
||||
RouterHandler(setting){
|
||||
routerHandler(setting){
|
||||
//setting.isInitialRoute; bool类型 是否初始路由
|
||||
//setting.name; 要跳转的路由名key
|
||||
return PageRouteBuilder(
|
||||
@ -94,7 +94,7 @@ class _CupertinoAppFullDefault extends State {
|
||||
MyObserver(),
|
||||
],
|
||||
onGenerateRoute: (setting){ // 当通过Navigation.of(context).pushNamed跳转路由时,在routes查找不到时,会调用该方法
|
||||
RouterHandler(setting);
|
||||
routerHandler(setting);
|
||||
},
|
||||
onGenerateTitle: (context){ // 跟上面的tiitle一样,但含有一个context参数用于做本地化
|
||||
return 'Flutter应用';
|
||||
|
@ -40,6 +40,7 @@ class _CupertinoIconsFullDefault extends State {
|
||||
flex:1,
|
||||
child: CupertinoButton(
|
||||
padding: EdgeInsets.only(left: 0),
|
||||
onPressed: () { },
|
||||
child:FlatButton.icon(
|
||||
label: Text('默认按钮', semanticsLabel: 'Add'),
|
||||
icon:Icon(itA,
|
||||
@ -51,6 +52,7 @@ class _CupertinoIconsFullDefault extends State {
|
||||
flex:1,
|
||||
child: CupertinoButton(
|
||||
padding: EdgeInsets.zero,
|
||||
onPressed: () { },
|
||||
child:FlatButton.icon(
|
||||
label: Text('默认按钮', semanticsLabel: 'Add'),
|
||||
icon:Icon(itB,
|
||||
|
@ -28,11 +28,11 @@ class _CupertinoPopupSurfaceFullDefault extends State {
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
height: MediaQuery.of(context).size.height/5,
|
||||
child: CupertinoPopupSurfaceBar(context)
|
||||
child: cupertinoPopupSurfaceBar(context)
|
||||
);
|
||||
}
|
||||
|
||||
Widget CupertinoPopupSurfaceBar(BuildContext context) {
|
||||
Widget cupertinoPopupSurfaceBar(BuildContext context) {
|
||||
return CupertinoPopupSurface(
|
||||
isSurfacePainted:false,
|
||||
child: Container(
|
||||
|
Reference in New Issue
Block a user