Created
November 22, 2021 08:15
-
-
Save gabrielgatu/413d4177f2cf7a07d313632db1dbdadf to your computer and use it in GitHub Desktop.
Flutter2Start - FloatingActionButton #flutter2start
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ignore_for_file: use_key_in_widget_constructors, prefer_const_constructors, prefer_const_literals_to_create_immutables | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(App()); | |
} | |
class App extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: HomePage(), | |
); | |
} | |
} | |
class HomePage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text("Flutter2Start"), | |
centerTitle: true, | |
), | |
body: Center( | |
child: Text("Empty."), | |
), | |
floatingActionButton: FloatingActionButton.extended( | |
backgroundColor: Colors.red.shade100, | |
foregroundColor: Colors.red.shade900, | |
splashColor: Colors.red.shade200, | |
icon: Icon(Icons.add), | |
label: Text("Email"), | |
onPressed: () {}, | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment