Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
sangohkim authored Oct 1, 2024
2 parents c2ceb2a + d5a7c0b commit b1cca4a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@
android:value="2" />
</application>
<uses-permission android:name="android.permission.INTERNET"/>

</manifest>
42 changes: 22 additions & 20 deletions lib/utils/slide_routing.dart
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,
// );
// }),
// );
}

0 comments on commit b1cca4a

Please sign in to comment.