Outline Button Widget in Flutter


Here is the simple program for printing the outline button widget in Flutter.


Source Code

import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: HomePage(),
      debugShowCheckedModeBanner: false,
    );
  }
}
class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('Outline Button')),
      body: Center(
        child: OutlineButton(
          padding: EdgeInsets.symmetric(vertical: 10, horizontal: 50),
          child: Text(
            'Click Me',
            style: TextStyle(fontSize: 18.0),
          ),
          onPressed: () {},
          textColor: Colors.blue,
          highlightColor: Colors.yellow,
          splashColor: Colors.deepOrange,
          borderSide: BorderSide(
            color: Colors.red,
            style: BorderStyle.solid,
            width: 3.0,
          ),
          shape:
              RoundedRectangleBorder(borderRadius: BorderRadius.circular(50.0)),
        ),
      ),
    );
  }
}
To download raw file Click Here