Flutter Tutorials

Flutter app development tutorials


flutter – OutlinedButton shape

main.dart


import 'package:flutter/material.dart';

void main(){
  runApp(
    MaterialApp(
      theme: ThemeData(primarySwatch: Colors.purple),
      home: Scaffold(
          appBar: AppBar(
              title: const Text("Flutter - OutlinedButton Shape")
          ),
          body: Center(
            child: OutlinedButton(
                onPressed: (){},
                child: const Text("Click Me"),
                style: OutlinedButton.styleFrom(
                    shape: const RoundedRectangleBorder(
                      borderRadius: BorderRadius.only(
                          topLeft: Radius.circular(24),
                          bottomRight: Radius.circular(24)
                      ),
                    ),
                    padding: const EdgeInsets.symmetric(
                        horizontal: 64, vertical: 24
                    )
                )
            ),
          )
      ),
    ),
  );
}

More flutter tutorials



About Me

Flutter Developer

Design a site like this with WordPress.com
Get started