DEV Community

Coder
Coder

Posted on

Button in Flutter

Image description
code:-

import 'package:flutter/material.dart';

void main() {
  runApp(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(
      debugShowCheckedModeBanner: false,
      darkTheme: ThemeData.dark(),
      title: 'Om Namah Shivay',
      home: Scaffold(
        appBar: AppBar(
          centerTitle: true,
          backgroundColor: Colors.red,
          title: Text(
            'Button',
            style: TextStyle(color: Colors.black),
          ),
        ),
        body: Center(
          child: ElevatedButton(
              style: ButtonStyle(
                  fixedSize: WidgetStatePropertyAll(Size(100, 100)),
                  shape: WidgetStatePropertyAll(RoundedRectangleBorder(
                      side: BorderSide(color: Colors.white, width: 3),
                      borderRadius: BorderRadius.only(
                          topLeft: Radius.circular(50),
                          bottomRight: Radius.circular(50)))),
                  elevation: WidgetStatePropertyAll(5.0),
                  backgroundColor: WidgetStatePropertyAll(Colors.red)),
              onPressed: () {},
              child: Text(
                'Click',
                style: TextStyle(color: Colors.black),
              )),
        ),
      ),
    );
  }
}

Enter fullscreen mode Exit fullscreen mode

I understood

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up