Advertisement
joaopaulofcc

Untitled

Nov 4th, 2020
2,129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.30 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. void main() {
  4.   runApp(MyApp());
  5. }
  6.  
  7. class MyApp extends StatelessWidget {
  8.   @override
  9.   Widget build(BuildContext context) {
  10.     return MaterialApp(
  11.       title: 'Prova 01',
  12.       theme: ThemeData(
  13.         primarySwatch: Colors.red,
  14.         visualDensity: VisualDensity.adaptivePlatformDensity,
  15.       ),
  16.       home: MyHomePage(title: 'Prova 01'),
  17.     );
  18.   }
  19. }
  20.  
  21. class MyHomePage extends StatefulWidget {
  22.   MyHomePage({Key key, this.title}) : super(key: key);
  23.  
  24.   final String title;
  25.  
  26.   @override
  27.   _MyHomePageState createState() => _MyHomePageState();
  28. }
  29.  
  30. class _MyHomePageState extends State<MyHomePage> {
  31.  
  32.   @override
  33.   Widget build(BuildContext context) {
  34.     return Scaffold(
  35.       appBar: AppBar(
  36.         title: Text(widget.title),
  37.       ),
  38.       body: Center(
  39.         child: Column(
  40.           mainAxisAlignment: MainAxisAlignment.start,
  41.           children: <Widget>[
  42.             new Padding(
  43.                 padding: const EdgeInsets.all(8.0),
  44.                 child: new RaisedButton(
  45.                     textColor: Colors.blue,
  46.                     color: Colors.red,
  47.                     onPressed: () {},
  48.                     child: new Text("BTN1"),
  49.                 ),
  50.             ),    
  51.           ],
  52.         ),
  53.       ),
  54.     );
  55.   }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement