removed dep for std solution

This commit is contained in:
shilangyu 2020-10-06 17:02:19 +02:00
parent a14560d11f
commit 021af8497a
3 changed files with 8 additions and 14 deletions

View File

@ -1,6 +1,5 @@
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';
@ -63,8 +62,11 @@ 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),
));
context,
PageRouteBuilder(
pageBuilder: (_, __, ___) => MediaViewPage(url),
transitionDuration: const Duration(milliseconds: 300),
transitionsBuilder: (_, animation, __, child) =>
FadeTransition(opacity: animation, child: child),
),
);

View File

@ -471,13 +471,6 @@ 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:

View File

@ -22,7 +22,6 @@ environment:
dependencies:
# widgets
page_transition: "^1.1.7+2"
flutter_speed_dial: ^1.2.5
flutter_slidable: ^0.5.7
photo_view: ^0.10.2