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
Jul 31, 2024
by
Efren David Jimenez Martinez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Actividad interfaz de usuario Login
parent
24fadfa6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
30 deletions
+37
-30
main.dart
lib/main.dart
+1
-19
login_page.dart
lib/src/pages/login_page.dart
+36
-11
No files found.
lib/main.dart
View file @
568a3cdb
...
@@ -13,7 +13,7 @@ class MyApp extends StatelessWidget {
...
@@ -13,7 +13,7 @@ class MyApp extends StatelessWidget {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
MaterialApp
(
return
MaterialApp
(
debugShowCheckedModeBanner:
false
,
debugShowCheckedModeBanner:
false
,
title:
'
Flutter Demo
'
,
title:
'
Practica Flutter
'
,
theme:
ThemeData
(
theme:
ThemeData
(
colorScheme:
ColorScheme
.
fromSeed
(
seedColor:
Colors
.
deepPurple
),
colorScheme:
ColorScheme
.
fromSeed
(
seedColor:
Colors
.
deepPurple
),
useMaterial3:
true
,
useMaterial3:
true
,
...
@@ -25,21 +25,3 @@ class MyApp extends StatelessWidget {
...
@@ -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
);
}
}
lib/src/pages/login_page.dart
View file @
568a3cdb
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
class
LoginPage
extends
State
less
Widget
{
class
LoginPage
extends
State
ful
Widget
{
const
LoginPage
({
Key
?
key
})
:
super
(
key:
key
);
const
LoginPage
({
Key
?
key
})
:
super
(
key:
key
);
@override
@override
_LoginPageState
createState
()
=>
_LoginPageState
();
}
class
_LoginPageState
extends
State
<
LoginPage
>
{
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
const
Text
(
'
Estoy en Logi
n'
),
title:
const
Text
(
'
Iniciar sesió
n'
),
backgroundColor:
Colors
.
lightBlue
,
// Agregar color en la appBar
backgroundColor:
Colors
.
lightBlue
,
actions:
const
[
// Agregar iconos
actions:
const
[
Icon
(
Icons
.
search
),
Icon
(
Icons
.
search
),
Icon
(
Icons
.
menu
),
Icon
(
Icons
.
menu
),
],
],
),
),
body:
Padding
(
body:
Center
(
padding:
const
EdgeInsets
.
all
(
16.0
),
child:
Center
(
child:
Column
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
// Agrega la imagen local
Image
.
asset
(
'assets/img/logo_visorus.jpg'
),
Image
.
asset
(
'assets/img/logo_visorus.jpg'
,
height:
100
),
const
SizedBox
(
height:
20
),
// Botón para navegar a la página 'homeSeller'
//Campo de Usuario
TextField
(
decoration:
const
InputDecoration
(
labelText:
'Usuario'
,
border:
OutlineInputBorder
(),
),
),
const
SizedBox
(
height:
20
),
//Campo de contraseña
TextField
(
decoration:
const
InputDecoration
(
labelText:
'Contraseña'
,
border:
OutlineInputBorder
(),
),
obscureText:
true
,
),
const
SizedBox
(
height:
20
),
ElevatedButton
(
ElevatedButton
(
onPressed:
()
{
onPressed:
()
{
// Navega a la página 'homeSeller' cuando se presiona el botón.
Navigator
.
pushNamed
(
context
,
'homeSeller'
);
Navigator
.
pushNamed
(
context
,
'homeSeller'
);
},
},
child:
const
Text
(
'Avanzar a Home
'
),
child:
const
Text
(
'Acceder
'
),
),
),
],
],
),
),
),
),
),
);
);
}
}
}
}
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