Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:app_esdudez/tabs/signupView.dart';
- import 'package:flutter/material.dart';
- import 'loginView.dart';
- class FirstTab extends StatefulWidget {
- @override
- _FirstTabState createState() => _FirstTabState();
- }
- class _FirstTabState extends State<FirstTab> {
- Widget build(BuildContext context) {
- return Scaffold(
- backgroundColor: Colors.lightBlueAccent[700],
- body: Container(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.stretch,
- children: <Widget>[
- Padding(padding: EdgeInsets.only(top: 120.0)),
- logoApp(), //logo app
- Padding(padding: EdgeInsets.only(top: 120.0)),
- Padding(
- padding: EdgeInsets.only(left: 25.0, right: 25.0),
- child: Container(
- height: 50.0,
- child: botaoFirstView(
- "Entrar",
- MaterialPageRoute(
- builder: (context) => LoginTab())), //Botao de entrar
- ),
- ),
- Padding(
- padding: EdgeInsets.only(top: 25.0, left: 25.0, right: 25.0),
- child: Container(
- height: 50.0,
- child: botaoFirstView(
- "Cadastrar-se",
- MaterialPageRoute(
- builder: (context) => SignUpTab())), //Botao de cadastro
- ),
- )
- ],
- ),
- ),
- );
- }
- Widget botaoFirstView(String nomeBotao, MaterialPageRoute rotaBotao) {
- return RaisedButton(
- key: Key('signIn'),
- child: Text(nomeBotao,
- style: TextStyle(fontSize: 17.0, color: Colors.black)),
- color: Colors.white,
- padding: EdgeInsets.symmetric(vertical: 14),
- elevation: 3.0,
- shape: new RoundedRectangleBorder(
- borderRadius: new BorderRadius.circular(30.0)),
- onPressed: () {
- Navigator.of(context).push(rotaBotao);
- },
- );
- }
- Widget logoApp() {
- return Icon(
- Icons.android,
- size: 135.0,
- color: Colors.white,
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement