insta_image_viewer 1.0.4 copy "insta_image_viewer: ^1.0.4" to clipboard
insta_image_viewer: ^1.0.4 copied to clipboard

A simple widget for full screen with swipe to dismiss, pinch & zoom.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:insta_image_viewer/insta_image_viewer.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Insta Image Viewer Example'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            SizedBox(
              width: 100,
              height: 140,
              child: InstaImageViewer(
                child: Image(
                  image: Image.network("https://picsum.photos/id/429/1080/1920")
                      .image,
                ),
              ),
            ),
            const SizedBox(height: 20),
            SizedBox(
              width: 100,
              height: 140,
              child: InstaImageViewer(
                child: Image(
                  image:
                      Image.network("https://picsum.photos/id/507/1000").image,
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
124
likes
150
points
2.87k
downloads

Publisher

verified publisheragoradesk.com

Weekly Downloads

A simple widget for full screen with swipe to dismiss, pinch & zoom.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on insta_image_viewer