Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
primera_practica
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yenisleydi Benitez Martinez
primera_practica
Commits
ef0fb08b
Commit
ef0fb08b
authored
Jul 31, 2024
by
yenisleydi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI home
parent
e65ec0b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
14 deletions
+53
-14
home_page.dart
lib/src/pages/home_page.dart
+52
-13
login_page.dart
lib/src/pages/login_page.dart
+1
-1
No files found.
lib/src/pages/home_page.dart
View file @
ef0fb08b
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
class
HomePage
extends
StatelessWidget
{
class
HomePage
extends
StatelessWidget
{
const
HomePage
({
Key
?
key
})
:
super
(
key:
key
);
// Constructor
const
HomePage
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
// Barra de aplicaciones
appBar:
AppBar
(
title:
const
Text
(
'Home Page'
),
// Título de la barra
title:
const
Text
(
'Home'
),
backgroundColor:
Colors
.
blue
,
actions:
[
IconButton
(
icon:
const
Icon
(
Icons
.
search
),
onPressed:
(){
},
)
],
),
),
body:
Center
(
// Centra el contenido
drawer:
Drawer
(
child:
Column
(
// Dispone los hijos en una columna
child:
ListView
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
// Centra verticalmente
padding:
EdgeInsets
.
zero
,
children:
[
// Lista de hijos
children:
[
const
Text
(
'Hola home page'
),
// Texto
const
DrawerHeader
(
const
SizedBox
(
height:
20
),
// Tamaño del texto
decoration:
BoxDecoration
(
ElevatedButton
(
// Botón
color:
Colors
.
blue
,
onPressed:
()
{
// Acción al presionar
),
Navigator
.
pushNamed
(
context
,
'articles'
);
// Navega a 'articles'
child:
Text
(
'Menu'
),
),
ListTile
(
title:
const
Text
(
'Configuraciones'
),
),
ListTile
(
title:
const
Text
(
'Ayuda'
),
),
ListTile
(
title:
const
Text
(
'Exit'
),
),
],
),
),
body:
Center
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
const
Text
(
'Hola home page'
),
const
SizedBox
(
height:
20
),
ElevatedButton
(
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
'articles'
);
},
},
child:
const
Text
(
'Ir a Articles Page'
),
// Texto del botón
child:
const
Text
(
'Ir a Articles Page'
),
),
),
],
],
),
),
),
),
floatingActionButton:
FloatingActionButton
(
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
'login'
);
},
child:
const
Icon
(
Icons
.
add
),
tooltip:
'Agregar categoria'
,
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
endFloat
,
);
);
}
}
}
}
lib/src/pages/login_page.dart
View file @
ef0fb08b
...
@@ -5,7 +5,7 @@ class LoginPage extends StatelessWidget {
...
@@ -5,7 +5,7 @@ class LoginPage extends StatelessWidget {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
// Barra de aplicaciones en la parte superior
appBar:
AppBar
(
// Barra de aplicaciones en la parte superior
title:
const
Text
(
'Login Page'
),
// Título de la barra
title:
const
Text
(
'Login Page'
),
// Título de la barra
),
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment