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

Speedy emails, satisfied customers

Postmark Image

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

Sign up

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

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

Okay