update image transition

hmxc
小赖 4 years ago
parent 68fde22761
commit 82bf2909a8

@ -1,6 +1,8 @@
import 'dart:async'; import 'dart:async';
import 'dart:ui'; import 'dart:ui';
import 'package:aku_community/widget/bee_back_button.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -201,8 +203,10 @@ class _SignInPageState extends State<SignInPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return BeeScaffold(
backgroundColor: Colors.white, leading: BeeBackButton(),
title: '',
bgColor: Colors.white,
body: GestureDetector( body: GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
@ -279,7 +283,7 @@ class _SignInPageState extends State<SignInPage> {
MaterialButton( MaterialButton(
shape: StadiumBorder(), shape: StadiumBorder(),
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
onPressed: () => Get.to(AgreementPage()), onPressed: () => Get.to(() => AgreementPage()),
child: Text( child: Text(
'《小蜜蜂用户协议》', '《小蜜蜂用户协议》',
style: TextStyle( style: TextStyle(

@ -177,10 +177,12 @@ class _AdvicePageState extends State<AdvicePage> with TickerProviderStateMixin {
), ),
secondChild: BottomButton( secondChild: BottomButton(
onPressed: () async { onPressed: () async {
bool needRefresh = await Get.to(NewAdvicePage( bool needRefresh = await Get.to(
type: widget.type, () => NewAdvicePage(
initType: _tabController.index, type: widget.type,
)); initType: _tabController.index,
),
);
if (needRefresh == true) { if (needRefresh == true) {
_refreshController.callRefresh(); _refreshController.callRefresh();
Get.dialog(CupertinoAlertDialog( Get.dialog(CupertinoAlertDialog(

@ -13,12 +13,16 @@ class BeeImagePreview extends StatefulWidget {
return await navigator.push( return await navigator.push(
PageRouteBuilder( PageRouteBuilder(
opaque: false, opaque: false,
fullscreenDialog: true,
pageBuilder: (context, animation, secondAnimation) { pageBuilder: (context, animation, secondAnimation) {
return FadeTransition( return FadeTransition(
opacity: animation, opacity: animation,
child: BeeImagePreview.file(file: file, tag: tag), child: BeeImagePreview.file(file: file, tag: tag),
); );
}, },
transitionsBuilder: (context, animation, secondaryAnimation, child) {
return child;
},
), ),
); );
} }
@ -27,10 +31,14 @@ class BeeImagePreview extends StatefulWidget {
navigator.push( navigator.push(
PageRouteBuilder( PageRouteBuilder(
opaque: false, opaque: false,
fullscreenDialog: true,
pageBuilder: (context, animation, secondAnimation) { pageBuilder: (context, animation, secondAnimation) {
return BeeImagePreview.path(path: path, tag: tag);
},
transitionsBuilder: (context, animation, secondaryAnimation, child) {
return FadeTransition( return FadeTransition(
opacity: animation, opacity: animation,
child: BeeImagePreview.path(path: path, tag: tag), child: child,
); );
}, },
), ),

Loading…
Cancel
Save