diff --git a/API.md b/API.md deleted file mode 100644 index 65904c31..00000000 --- a/API.md +++ /dev/null @@ -1,80 +0,0 @@ -# Photo View API reference - -## PhotoView class - -A [StatefulWidget](https://docs.flutter.io/flutter/widgets/StatefulWidget-class.html) that contains all the photo view rendering elements. - -#### Sample code - -```dart -new PhotoView( - imageProvider: imageProvider, - loadingChild: new LoadingText(), - backgroundColor: Colors.white, - minScale: PhotoViewScaleBoundary.contained, - maxScale: 2.0, - gaplessPlayback: false, - size: MediaQuery.of(context).size, - heroTag: "someTag" -); -``` - -### Constructor - -[PhotoView](/lib/photo_view.dart)({ -@required [ImageProvider](https://docs.flutter.io/flutter/painting/ImageProvider-class.html) imageProvider, -[Widget](https://docs.flutter.io/flutter/widgets/Widget-class.html) loadingChild, -[Color](https://docs.flutter.io/flutter/dart-ui/Color-class.html) backgroundColor, -dynamic ([double](https://docs.flutter.io/flutter/dart-core/double-class.html) or [PhotoViewScaleBoundary](/lib/photo_view_scale_boundary.dart)) minScale, -dynamic ([double](https://docs.flutter.io/flutter/dart-core/double-class.html) or [PhotoViewScaleBoundary](/lib/photo_view_scale_boundary.dart)) maxScale, -bool gaplessPlayback, -[Size](https://docs.flutter.io/flutter/dart-ui/Size-class.html) size, -Object herotag}) - -Given a `imageProvider` it resolves into an zoomable image widget using a [FutureBuilder](https://docs.flutter.io/flutter/widgets/FutureBuilder-class.html). - -In the meantime, PhotoView can show an intermediate view, something like a "loader", passed via `loadingChild`. - -The zoom scale can be clamped by `minScale` and `maxScale` params. - -`backgroundColor`, changes the background behind image, defaults to `Colors.black`. - -The parameter `gaplessPlayback` is used to continue showing the old image (`true`), or briefly show nothing (`false`), when the `imageProvider` changes. By default it's set to `false`. - -`size` defines the size of the scaling base of the image inside `PhotoView`, by default it is `MediaQuery.of(context).size`. This param is used by `PhotoViewInline` class. - -**All but `imageProvider` are optional** - - - -## PhotoViewInline class - -A [StatelessWidget](https://docs.flutter.io/flutter/widgets/StatelessWidget-class.html) wich the only child is a `PhotoView` with an automacaly calculated `size`. - -#### Sample code - -```dart -new PhotoViewInline( - imageProvider: imageProvider, - loadingChild: new LoadingText(), - backgroundColor: Colors.white, - minScale: PhotoViewScaleBoundary.contained, - maxScale: 2.0, - gaplessPlayback: false, -); -``` - -### Constructor - -[PhotoViewInline](/lib/photo_view.dart)({ -@required [ImageProvider](https://docs.flutter.io/flutter/painting/ImageProvider-class.html) imageProvider, -[Widget](https://docs.flutter.io/flutter/widgets/Widget-class.html) loadingChild, -[Color](https://docs.flutter.io/flutter/dart-ui/Color-class.html) backgroundColor, -dynamic ([double](https://docs.flutter.io/flutter/dart-core/double-class.html) or [PhotoViewScaleBoundary](/lib/photo_view_scale_boundary.dart)) minScale, -dynamic ([double](https://docs.flutter.io/flutter/dart-core/double-class.html) or [PhotoViewScaleBoundary](/lib/photo_view_scale_boundary.dart)) maxScale, -bool gaplessPlayback, -[Size](https://docs.flutter.io/flutter/dart-ui/Size-class.html) size, -Object herotag -}) - - diff --git a/README.md b/README.md index 2dc9afe9..280b8b15 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Widget build(BuildContext context) { ### API -For more information about how to use Photo View, check the [API Docs](/API.md) +For more information about how to use Photo View, check the [API Docs](https://pub.dartlang.org/documentation/photo_view/latest/photo_view/photo_view-library.html) ### Screenshots diff --git a/example/lib/screens/home_screen.dart b/example/lib/screens/home_screen.dart index 7e49590f..948447f9 100644 --- a/example/lib/screens/home_screen.dart +++ b/example/lib/screens/home_screen.dart @@ -1,7 +1,7 @@ -import 'package:example/screens/hero_example.dart'; import 'package:flutter/material.dart'; import './app_bar.dart'; import './full_screen_examples.dart'; +import './hero_example.dart'; import './inline_examples.dart'; class HomeScreen extends StatelessWidget{ diff --git a/pubspec.yaml b/pubspec.yaml index 4b8ef513..29bf5c0b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: photo_view description: A simple zoomable image widget for Flutter. -version: 0.0.5 +version: 0.0.6 author: Renan C. Araújo homepage: https://github.com/renancaraujo/photo_view