Flat Button Widget in Flutter

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

Source Code

import 'package:flutter/material.dart';
void main() {
    home: MyApp(),
class MyApp extends StatefulWidget {
  _State createState() => _State();
class _State extends State<MyApp> {
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Flat Button'),
      body: Center(
        child: FlatButton(
          color: Colors.red,
          textColor: Colors.white,
          padding: EdgeInsets.all(5.0),
          splashColor: Colors.blueAccent,
          disabledTextColor: Colors.deepOrange,
          disabledColor: Colors.grey,
          child: Text('Click Me'),
To download raw file Click Here

Learn All in Tamil © Designed & Developed By Tutor Joes