change media view transition to fade

This commit is contained in:
krawieck 2020-10-06 22:24:03 +02:00
parent a320dc5ca3
commit 33ab5324c4
4 changed files with 40 additions and 23 deletions

View File

@ -1,9 +1,11 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:page_transition/page_transition.dart';
import '../pages/community.dart';
import '../pages/full_post.dart';
import '../pages/instance.dart';
import '../pages/media_view.dart';
import '../pages/user.dart';
/// Pushes onto the navigator stack the given widget
@ -59,3 +61,10 @@ abstract class goToUser {
void goToPost(BuildContext context, String instanceUrl, int postId) => goTo(
context, (context) => FullPostPage(instanceUrl: instanceUrl, id: postId));
void goToMedia(BuildContext context, String url) => Navigator.push(
context,
PageTransition(
type: PageTransitionType.fade,
child: MediaViewPage(url),
));

View File

@ -16,7 +16,7 @@ class FullscreenableImage extends StatelessWidget {
}) : super(key: key);
_onTap(BuildContext c) {
goTo(c, (context) => MediaViewPage(url));
goToMedia(c, url);
}
@override

View File

@ -28,14 +28,14 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.2"
version: "2.5.0-nullsafety.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.0-nullsafety.1"
build:
dependency: transitive
description:
@ -105,14 +105,14 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.1.0-nullsafety.3"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
version: "1.2.0-nullsafety.1"
checked_yaml:
dependency: transitive
description:
@ -133,7 +133,7 @@ packages:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "1.1.0-nullsafety.1"
code_builder:
dependency: transitive
description:
@ -147,7 +147,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.13"
version: "1.15.0-nullsafety.3"
convert:
dependency: transitive
description:
@ -203,7 +203,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0-nullsafety.1"
ffi:
dependency: transitive
description:
@ -400,14 +400,14 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.8"
version: "0.12.10-nullsafety.1"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.8"
version: "1.3.0-nullsafety.3"
mime:
dependency: transitive
description:
@ -471,13 +471,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.3"
page_transition:
dependency: "direct main"
description:
name: page_transition
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.7+2"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.8.0-nullsafety.1"
path_provider:
dependency: transitive
description:
@ -664,7 +671,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.8.0-nullsafety.2"
sqflite:
dependency: transitive
description:
@ -685,14 +692,14 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.5"
version: "1.10.0-nullsafety.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.0-nullsafety.1"
stream_transform:
dependency: transitive
description:
@ -706,7 +713,7 @@ packages:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
version: "1.1.0-nullsafety.1"
synchronized:
dependency: transitive
description:
@ -720,14 +727,14 @@ packages:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0-nullsafety.1"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.17"
version: "0.2.19-nullsafety.2"
timeago:
dependency: "direct main"
description:
@ -748,7 +755,7 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.0-nullsafety.3"
url_launcher:
dependency: "direct main"
description:
@ -804,7 +811,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
version: "2.1.0-nullsafety.3"
watcher:
dependency: transitive
description:
@ -841,5 +848,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.9.0 <3.0.0"
dart: ">=2.10.0-110 <2.11.0"
flutter: ">=1.20.0 <2.0.0"

View File

@ -3,7 +3,7 @@ description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
publish_to: "none" # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
@ -18,10 +18,11 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 0.1.0
environment:
sdk: '>=2.7.0 <3.0.0'
sdk: ">=2.7.0 <3.0.0"
dependencies:
# widgets
page_transition: "^1.1.7+2"
flutter_speed_dial: ^1.2.5
flutter_slidable: ^0.5.7
photo_view: ^0.10.2
@ -32,7 +33,7 @@ dependencies:
# native
esys_flutter_share: ^1.0.2
url_launcher: ^5.5.1
shared_preferences: '>=0.5.0 <2.0.0'
shared_preferences: ">=0.5.0 <2.0.0"
package_info: ^0.4.3
# state management