zoomable_interactive_viewer 0.0.1 copy "zoomable_interactive_viewer: ^0.0.1" to clipboard
zoomable_interactive_viewer: ^0.0.1 copied to clipboard

A customizable Flutter widget that provides interactive zoom and pan functionality. Ideal for applications that require detailed content viewing, such as image galleries, maps, or diagrams. It allow [...]

example/lib/main.dart

// example/lib/main.dart
import 'package:flutter/material.dart';
import 'image_example.dart';
import 'list_example.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Zoomable Interactive Viewer Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const ZoomDemoHomePage(),
    );
  }
}

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

  @override
  State<ZoomDemoHomePage> createState() => _ZoomDemoHomePageState();
}

class _ZoomDemoHomePageState extends State<ZoomDemoHomePage> {
  int _selectedIndex = 0;

  static const List<Widget> _pages = <Widget>[
    ImageExamplePage(),
    ListExamplePage(),
  ];

  void _onItemTapped(int index) {
    setState(() {
      _selectedIndex = index;
    });
  }

  // Optional: Titles for the AppBar based on selected page
  static const List<String> _titles = <String>[
    'Image Zoom Example',
    'List Zoom Example',
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(_titles[_selectedIndex]),
      ),
      body: _pages[_selectedIndex],
      bottomNavigationBar: BottomNavigationBar(
        items: const <BottomNavigationBarItem>[
          BottomNavigationBarItem(
            icon: Icon(Icons.image),
            label: 'Image',
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.list),
            label: 'List',
          ),
        ],
        currentIndex: _selectedIndex,
        selectedItemColor: Colors.blue, // Highlight color
        onTap: _onItemTapped,
      ),
    );
  }
}
10
likes
0
points
208
downloads

Publisher

verified publisherartinnovations.dev

Weekly Downloads

A customizable Flutter widget that provides interactive zoom and pan functionality. Ideal for applications that require detailed content viewing, such as image galleries, maps, or diagrams. It allows smooth zooming in, zooming out, and panning gestures, with optional features like double-tap zoom and zoom buttons. The package is simple to integrate and flexible enough to support various content types, making it perfect for apps that need to display large or intricate visuals.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on zoomable_interactive_viewer