foto_gallery 2.0.0 copy "foto_gallery: ^2.0.0" to clipboard
foto_gallery: ^2.0.0 copied to clipboard

Foto gallery package will help you to create reactive image slider.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:foto_gallery/app/ui/pages/foto_gallery_page.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      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> {
  List<String> imageList = [
    "https://images.pexels.com/photos/733853/pexels-photo-733853.jpeg",
    "https://images.pexels.com/photos/2899097/pexels-photo-2899097.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500",
    "https://images.pexels.com/photos/2820884/pexels-photo-2820884.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500",
  ];
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: ListView.builder(
        itemCount: imageList.length,
        itemBuilder: ((context, index) {
          return Container(
            height: 300,
            width: double.infinity,
            padding: const EdgeInsets.all(30),
            child: ClipRRect(
              borderRadius: BorderRadius.circular(30),
              child: FotoGallery(
                image: imageList[index],
                imageList: imageList,
                imgurl: imageList[index],
                index: index,
                fit: BoxFit.cover,
              ),
            ),
          );
        }),
      ),
    );
  }
}
4
likes
140
points
32
downloads

Publisher

unverified uploader

Weekly Downloads

Foto gallery package will help you to create reactive image slider.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, get

More

Packages that depend on foto_gallery