-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
23 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,4 +48,5 @@ | |
android:value="2" /> | ||
</application> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
import 'dart:io'; | ||
import 'package:flutter/cupertino.dart'; | ||
|
||
Route slideRoute(Widget dst) { | ||
// iOS, Android에서 모두 back swipe 적용 | ||
// TODO: Android에서 back swipe 적용할지 여부 논의 (2023.01.24) | ||
if (Platform.isIOS) { | ||
return CupertinoPageRoute( | ||
builder: (context) => dst, | ||
); | ||
} | ||
return PageRouteBuilder( | ||
pageBuilder: (context, animation, secondaryAnimation) => dst, | ||
transitionsBuilder: ((context, animation, secondaryAnimation, child) { | ||
var begin = const Offset(1, 0); | ||
var end = const Offset(0, 0); | ||
var curve = Curves.ease; | ||
|
||
var tween = Tween(begin: begin, end: end).chain(CurveTween(curve: curve)); | ||
var offsetAnimation = animation.drive(tween); | ||
return SlideTransition( | ||
position: offsetAnimation, | ||
child: child, | ||
); | ||
}), | ||
return CupertinoPageRoute( | ||
builder: (context) => dst, | ||
); | ||
// if (Platform.isIOS) { | ||
// return CupertinoPageRoute( | ||
// builder: (context) => dst, | ||
// ); | ||
// } | ||
// return PageRouteBuilder( | ||
// pageBuilder: (context, animation, secondaryAnimation) => dst, | ||
// transitionsBuilder: ((context, animation, secondaryAnimation, child) { | ||
// var begin = const Offset(1, 0); | ||
// var end = const Offset(0, 0); | ||
// var curve = Curves.ease; | ||
|
||
// var tween = Tween(begin: begin, end: end).chain(CurveTween(curve: curve)); | ||
// var offsetAnimation = animation.drive(tween); | ||
// return SlideTransition( | ||
// position: offsetAnimation, | ||
// child: child, | ||
// ); | ||
// }), | ||
// ); | ||
} |