flutgrid 0.0.4 copy "flutgrid: ^0.0.4" to clipboard
flutgrid: ^0.0.4 copied to clipboard

A Flutter package for building responsive grid layouts with ease.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'FlutGrid Example',
      theme: ThemeData(primarySwatch: Colors.blue),
      home: Scaffold(
        appBar: AppBar(title: const Text('FlutGrid Example')),
        body: Padding(
          padding: const EdgeInsets.all(16.0),
          child: FlutGrid(
            children: [
              FlutGridItem(
                xs: 12,
                sm: 6,
                md: 4,
                child: Container(
                  height: 100,
                  color: Colors.red,
                  child: const Center(child: Text('Item 1')),
                ),
              ),
              FlutGridItem(
                xs: 12,
                sm: 6,
                md: 4,
                child: Container(
                  height: 100,
                  color: Colors.green,
                  child: const Center(child: Text('Item 2')),
                ),
              ),
              FlutGridItem(
                xs: 12,
                sm: 6,
                md: 4,
                child: Container(
                  height: 100,
                  color: Colors.blue,
                  child: const Center(child: Text('Item 3')),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
1
likes
0
points
14
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for building responsive grid layouts with ease.

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutgrid