Here is the simple program for printing the flat button widget in Flutter.
import 'package:flutter/material.dart'; void main() { runApp(MaterialApp( home: MyApp(), )); } class MyApp extends StatefulWidget { @override _State createState() => _State(); } class _State extends State<MyApp> { @override 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 | Privacy Policy | Terms & Conditions