Advertisement
Guest User

Untitled

a guest
Nov 17th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. import 'package:app_esdudez/tabs/signupView.dart';
  2. import 'package:flutter/material.dart';
  3.  
  4. import 'loginView.dart';
  5.  
  6. class FirstTab extends StatefulWidget {
  7. @override
  8. _FirstTabState createState() => _FirstTabState();
  9. }
  10.  
  11. class _FirstTabState extends State<FirstTab> {
  12. Widget build(BuildContext context) {
  13. return Scaffold(
  14. backgroundColor: Colors.lightBlueAccent[700],
  15. body: Container(
  16. child: Column(
  17. crossAxisAlignment: CrossAxisAlignment.stretch,
  18. children: <Widget>[
  19. Padding(padding: EdgeInsets.only(top: 120.0)),
  20. logoApp(), //logo app
  21. Padding(padding: EdgeInsets.only(top: 120.0)),
  22. Padding(
  23. padding: EdgeInsets.only(left: 25.0, right: 25.0),
  24. child: Container(
  25. height: 50.0,
  26. child: botaoFirstView(
  27. "Entrar",
  28. MaterialPageRoute(
  29. builder: (context) => LoginTab())), //Botao de entrar
  30. ),
  31. ),
  32. Padding(
  33. padding: EdgeInsets.only(top: 25.0, left: 25.0, right: 25.0),
  34. child: Container(
  35. height: 50.0,
  36. child: botaoFirstView(
  37. "Cadastrar-se",
  38. MaterialPageRoute(
  39. builder: (context) => SignUpTab())), //Botao de cadastro
  40. ),
  41. )
  42. ],
  43. ),
  44. ),
  45. );
  46. }
  47.  
  48. Widget botaoFirstView(String nomeBotao, MaterialPageRoute rotaBotao) {
  49. return RaisedButton(
  50. key: Key('signIn'),
  51. child: Text(nomeBotao,
  52. style: TextStyle(fontSize: 17.0, color: Colors.black)),
  53. color: Colors.white,
  54. padding: EdgeInsets.symmetric(vertical: 14),
  55. elevation: 3.0,
  56. shape: new RoundedRectangleBorder(
  57. borderRadius: new BorderRadius.circular(30.0)),
  58. onPressed: () {
  59. Navigator.of(context).push(rotaBotao);
  60. },
  61. );
  62. }
  63.  
  64. Widget logoApp() {
  65. return Icon(
  66. Icons.android,
  67. size: 135.0,
  68. color: Colors.white,
  69. );
  70. }
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement