Skip to content

Instantly share code, notes, and snippets.

Created Sep 21, 2021
What would you like to do?
DDM6 - T5 PT3004252
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
title: 'DDMA6',
debugShowCheckedModeBanner: false,
theme: ThemeData(
home: const MyHomePage(title: 'T5 - DDMA'),
class MyHomePage extends StatefulWidget {
final String title;
const MyHomePage({
Key? key,
required this.title,
}) : super(key: key);
_MyHomePageState createState() => _MyHomePageState();
class _MyHomePageState extends State<MyHomePage> {
String button = 'Hello!';
void _changedButton() {
setState(() {
button='Lucas Souza Annunziato';
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
body: Center(
child: Column(
children: [
style: Theme.of(context).textTheme.headline4,
floatingActionButton: FloatingActionButton(
onPressed: _changedButton,
tooltip: 'Trocar Texto',
child: const Text('Clique Aqui'),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment