DEV Community

Coder
Coder

Posted on

Wrap in Flutter

Image description

import 'package:flutter/material.dart';

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

class om extends StatefulWidget {
  const om({super.key});

  @override
  State<om> createState() => _omState();
}

class _omState extends State<om> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      darkTheme: ThemeData.dark(),
      debugShowCheckedModeBanner: false,
      title: 'Om Namah Shivay',
      home: Scaffold(
        appBar: AppBar(
          title: Text(
            "Rows and Columns and wrap",
            style: TextStyle(color: Colors.black),
          ),
          centerTitle: true,
          backgroundColor: Colors.red,
        ),
        body: Wrap(
          alignment: WrapAlignment.center,
          direction: Axis.vertical,
          children: [
            Container(
              margin: EdgeInsets.all(15),
              color: Colors.red,
              width: 50,
              height: 50,
            ),
            Container(
              margin: EdgeInsets.all(15),
              color: Colors.red,
              width: 50,
              height: 50,
            ),
            Container(
              margin: EdgeInsets.all(15),
              color: Colors.red,
              width: 50,
              height: 50,
            ),
            Container(
              margin: EdgeInsets.all(15),
              color: Colors.red,
              width: 50,
              height: 50,
            ),
            Container(
              margin: EdgeInsets.all(15),
              color: Colors.red,
              width: 50,
              height: 50,
            ),
            Container(
              margin: EdgeInsets.all(15),
              color: Colors.red,
              width: 50,
              height: 50,
            ),
            Container(
              margin: EdgeInsets.all(15),
              color: Colors.red,
              width: 50,
              height: 50,
            ),
            Container(
              margin: EdgeInsets.all(15),
              color: Colors.red,
              width: 50,
              height: 50,
            ),
            Container(
              margin: EdgeInsets.all(15),
              color: Colors.red,
              width: 50,
              height: 50,
            ),
            Container(
              margin: EdgeInsets.all(15),
              color: Colors.red,
              width: 50,
              height: 50,
            ),
          ],
        ),
      ),
    );
  }
}

Enter fullscreen mode Exit fullscreen mode

I understood

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay