Logo

dev-resources.site

for different kinds of informations.

flutter container widget example

Published at
5/30/2023
Categories
flutter
dart
widgets
container
Author
realnamehidden1_61
Categories
4 categories in total
flutter
open
dart
open
widgets
open
container
open
Author
18 person written this
realnamehidden1_61
open
flutter container widget example
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
      ),
      home: ContainerWidget(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Container Widget'),
      ),
      body: Container(
        margin: EdgeInsets.all(20),
        padding: EdgeInsets.all(20),
        alignment: Alignment.bottomCenter,
        height: 300,
        width: 500,
        // color: Colors.amber,
        decoration: BoxDecoration(
          border: Border.all(
            width: 4,
            color: Colors.black,
          ),
          borderRadius: BorderRadius.circular(10),
          color: Colors.amber,
        ),
        child: Text(
          'This Is Container',
          style: TextStyle(
            fontSize: 30,
          ),
        ),
      ),
    );
  }
}

Enter fullscreen mode Exit fullscreen mode
widgets Article's
30 articles in total
Favicon
Unlocking the Power of Real-Time Forex Data for Algorithmic Trading
Favicon
How Forex Widgets for Website Improve User Engagement
Favicon
Top Free Stock Market Widget for Website Options
Favicon
Check out this new Repository!
Favicon
Flutter provides mainly 2 widgets Stateless and StatefulWidget
Favicon
How many widgets does flutter have?
Favicon
Widgets in flutter
Favicon
Building a Custom Flutter Widget from Scratch
Favicon
Common pitfalls when designing widgets in Flutter
Favicon
How to implement the Slide-to-Act Widget in Flutter
Favicon
10 Creative Ways to Utilize Widget Stacks on Your iPhone
Favicon
Top 10 Widgets Flutter ?
Favicon
Embeddable Widgets to Bring Web3 Experience to Any Website
Favicon
Flutter Project : Building Threads UI Using Flutter
Favicon
flutter container widget example
Favicon
flutter text widget example
Favicon
Updating widgets with Jetpack WorkManager
Favicon
Updating widgets - Introduction
Favicon
Getting started to Android App Widget
Favicon
Top 10 trending github repos for CSS developers in this week๐Ÿ‘ฝ.
Favicon
Flutter Widget Tรผrleri ๐Ÿ’ซ ๐ŸŒŒ โœจ
Favicon
Laravel Nova Metrics
Favicon
How Flutter renders Widgets
Favicon
Getting Started with Flutter Event Calendar in 10 Minutes
Favicon
How to Create a Flutter Range Slider in 10 Minutes
Favicon
Flutter: El marco tendencia para el desarrollo mรณvil
Favicon
Simple Analytics iOS widget with Scriptable app
Favicon
Pain: Embed a widget on a website.
Favicon
Hacking Rainmeter for my setup
Favicon
Google Mail... widget (iOS 14)

Featured ones: