photox 0.2.1 copy "photox: ^0.2.1" to clipboard
photox: ^0.2.1 copied to clipboard

An all-in-one solution for displaying interactive images.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});

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

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("DismissMode.swipeVertical"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            SizedBox(
                height: 400,
                width: MediaQuery.of(context).size.width,
                child: PhotoX(dismissMode: DismissMode.swipeVertical, items: [
                  PhotoXItem(
                      id: "1", resource: "assets/img1.jpeg", isAsset: true),
                  PhotoXItem(
                      id: "2", resource: "assets/img1.jpeg", isAsset: true),
                ]))
          ],
        ),
      ),
    );
  }
}
6
likes
130
points
94
downloads

Publisher

verified publishertuoku.dev

Weekly Downloads

An all-in-one solution for displaying interactive images.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

cached_network_image, collection, flutter, photo_view

More

Packages that depend on photox