carousel_grid 1.0.0 copy "carousel_grid: ^1.0.0" to clipboard
carousel_grid: ^1.0.0 copied to clipboard

outdated

Carousel Grid é um package para exibir thumbnail de imagens em grid com cache e zoom.

example/lib/main.dart

import 'package:carousel_grid/carousel_grid.dart';
import 'package:flutter/material.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(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);
  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  List<String> listOfUrls = [
    "https://cosmosmagazine.com/wp-content/uploads/2020/02/191010_nature.jpg",
    "https://scx2.b-cdn.net/gfx/news/hires/2019/2-nature.jpg",
    "https://isha.sadhguru.org/blog/wp-content/uploads/2016/05/natures-temples.jpg",
    "https://upload.wikimedia.org/wikipedia/commons/7/77/Big_Nature_%28155420955%29.jpeg",
    "https://www.expatica.com/app/uploads/sites/9/2017/06/Lake-Oeschinen-1200x675.jpg",
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: CarouselGrid(
          height: 285,
          width: 400,
          imageNetwork: true,
          listUrlImages: listOfUrls,
          iconBack: const Icon(
            Icons.arrow_back,
            color: Colors.white,
          ),
        ),
      ),
    );
  }
}
28
likes
0
points
168
downloads

Publisher

unverified uploader

Weekly Downloads

Carousel Grid é um package para exibir thumbnail de imagens em grid com cache e zoom.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cached_network_image, flutter, infinite_carousel, photo_view

More

Packages that depend on carousel_grid