/home_view.dart Secret
Created
February 28, 2022 21:12
This file contains hidden or 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
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