Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
Practica_Flutter_E
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
Efren David Jimenez Martinez
Practica_Flutter_E
Commits
568a3cdb
Commit
568a3cdb
authored
8 months ago
by
Efren David Jimenez Martinez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Actividad interfaz de usuario Login
parent
24fadfa6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
38 deletions
+45
-38
main.dart
lib/main.dart
+1
-19
login_page.dart
lib/src/pages/login_page.dart
+44
-19
No files found.
lib/main.dart
View file @
568a3cdb
...
...
@@ -13,7 +13,7 @@ class MyApp extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
return
MaterialApp
(
debugShowCheckedModeBanner:
false
,
title:
'
Flutter Demo
'
,
title:
'
Practica Flutter
'
,
theme:
ThemeData
(
colorScheme:
ColorScheme
.
fromSeed
(
seedColor:
Colors
.
deepPurple
),
useMaterial3:
true
,
...
...
@@ -25,21 +25,3 @@ class MyApp extends StatelessWidget {
}
}
class
MyWidget
extends
StatelessWidget
{
const
MyWidget
({
super
.
key
});
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
// Barra que se encuentra en la parte superior
title:
Text
(
"Prueba flutter estamo en el main "
),
// Agregar titulo en appBar
backgroundColor:
Colors
.
lightBlue
,
// Agregar color en la appBar
actions:
const
[
// Agregar iconos
Icon
(
Icons
.
search
),
Icon
(
Icons
.
menu
)
],
),
body:
Column
(
children:
[]),
// Va a tener varios hijos
);
}
}
This diff is collapsed.
Click to expand it.
lib/src/pages/login_page.dart
View file @
568a3cdb
import
'package:flutter/material.dart'
;
class
LoginPage
extends
State
less
Widget
{
class
LoginPage
extends
State
ful
Widget
{
const
LoginPage
({
Key
?
key
})
:
super
(
key:
key
);
@override
_LoginPageState
createState
()
=>
_LoginPageState
();
}
class
_LoginPageState
extends
State
<
LoginPage
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'
Estoy en Logi
n'
),
backgroundColor:
Colors
.
lightBlue
,
// Agregar color en la appBar
actions:
const
[
// Agregar iconos
title:
const
Text
(
'
Iniciar sesió
n'
),
backgroundColor:
Colors
.
lightBlue
,
actions:
const
[
Icon
(
Icons
.
search
),
Icon
(
Icons
.
menu
),
],
),
body:
Padding
(
padding:
const
EdgeInsets
.
all
(
16.0
),
child:
Center
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Image
.
asset
(
'assets/img/logo_visorus.jpg'
),
const
SizedBox
(
height:
20
),
//Campo de Usuario
TextField
(
decoration:
const
InputDecoration
(
labelText:
'Usuario'
,
border:
OutlineInputBorder
(),
),
),
const
SizedBox
(
height:
20
),
body:
Center
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
// Agrega la imagen local
Image
.
asset
(
'assets/img/logo_visorus.jpg'
,
height:
100
),
// Botón para navegar a la página 'homeSeller'
ElevatedButton
(
onPressed:
()
{
// Navega a la página 'homeSeller' cuando se presiona el botón.
Navigator
.
pushNamed
(
context
,
'homeSeller'
);
},
child:
const
Text
(
'Avanzar a Home'
),
),
],
//Campo de contraseña
TextField
(
decoration:
const
InputDecoration
(
labelText:
'Contraseña'
,
border:
OutlineInputBorder
(),
),
obscureText:
true
,
),
const
SizedBox
(
height:
20
),
ElevatedButton
(
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
'homeSeller'
);
},
child:
const
Text
(
'Acceder'
),
),
],
),
),
),
);
...
...
This diff is collapsed.
Click to expand it.
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