Skip to content

Instantly share code, notes, and snippets.

@brasizza
Created February 28, 2022 21:12
import 'dart:ui';
import 'package:get/get.dart';
import 'package:flutter/material.dart';
import './home_controller.dart';
class HomePage extends GetView<HomeController> {
const HomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('HomePage'),
),
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Spacer(),
Center(
child: Obx(
() => Text(
controller.contador.toString(),
style: const TextStyle(fontSize: 30, fontWeight: FontWeight.bold),
),
),
),
const Spacer(),
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment