infinite_lazy_grid 1.0.5 copy "infinite_lazy_grid: ^1.0.5" to clipboard
infinite_lazy_grid: ^1.0.5 copied to clipboard

infinitely scrollable and zoomable grid layout with lazy loading capabilities.

example/lib/main.dart

import 'simple_example.dart';
import './caching_test.dart';
import './dynamic_widget_example.dart';
import './render_callbacks_example.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(
    MaterialApp(
      // showPerformanceOverlay: true,
      title: 'Infinite Lazy 2D Grid Examples',
      home: const ExampleChooser(),
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Color(0xffffbf69)),
      ),
    ),
  );
}

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

  void _open(BuildContext context, Widget page) {
    Navigator.push(context, MaterialPageRoute(builder: (_) => page));
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Infinite Lazy Grid Examples')),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            ElevatedButton(
              onPressed: () => _open(context, const SimpleExample()),
              child: const Text('Simple Example'),
            ),
            const SizedBox(height: 16),
            ElevatedButton(
              onPressed: () => _open(context, const CachingTestApp()),
              child: const Text('Widget Build Counts'),
            ),
            const SizedBox(height: 16),
            ElevatedButton(
              onPressed: () => _open(context, const DynamicWidgetExample()),
              child: const Text('Widget State Updates'),
            ),
            const SizedBox(height: 16),
            ElevatedButton(
              onPressed: () => _open(context, const RenderCallbacksExample()),
              child: const Text('Render Callbacks Demo'),
            ),
            const SizedBox(height: 32),
            const Padding(
              padding: EdgeInsets.all(16.0),
              child: Text(
                'Examples:\n'
                '• Simple: Basic usage demo\n'
                '• Build Counts: To see what rebuilds when\n'
                '• Dynamic Inputs: How to handle changing widget data\n'
                '• Render Callbacks: See widgets enter/exit render area',
                textAlign: TextAlign.center,
                style: TextStyle(fontSize: 14, color: Colors.grey),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
8
likes
160
points
112
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

infinitely scrollable and zoomable grid layout with lazy loading capabilities.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, uuid

More

Packages that depend on infinite_lazy_grid