Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
appFluetter
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
Nayeli Monserrat Velasco Lopez
appFluetter
Commits
78e21345
Commit
78e21345
authored
Jul 31, 2024
by
Nayeli Monserrat Velasco Lopez
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'nayeli.velasco' into 'master'
UI home con boton See merge request
!5
parents
6e12581b
cf5c4977
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
home_page.dart
lib/src/pages/home_page.dart
+27
-2
No files found.
lib/src/pages/home_page.dart
View file @
78e21345
...
@@ -24,6 +24,16 @@ class HomePage extends StatefulWidget {
...
@@ -24,6 +24,16 @@ class HomePage extends StatefulWidget {
class
_HomePageState
extends
State
<
HomePage
>
{
class
_HomePageState
extends
State
<
HomePage
>
{
String
selectedPage
=
''
;
String
selectedPage
=
''
;
void
_handleNewCategory
()
{
// Define la acción que debe ocurrir cuando se presiona el botón "Nueva categoria"
setState
(()
{
selectedPage
=
'Nueva categoria'
;
});
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
const
SnackBar
(
content:
Text
(
'Nueva categoria presionada'
)),
);
}
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
DefaultTabController
(
return
DefaultTabController
(
...
@@ -75,7 +85,6 @@ class _HomePageState extends State<HomePage> {
...
@@ -75,7 +85,6 @@ class _HomePageState extends State<HomePage> {
Navigator
.
pop
(
context
);
// Close the drawer
Navigator
.
pop
(
context
);
// Close the drawer
},
},
),
),
ListTile
(
ListTile
(
leading:
const
Icon
(
Icons
.
settings
),
leading:
const
Icon
(
Icons
.
settings
),
title:
const
Text
(
'Configuraciones'
),
title:
const
Text
(
'Configuraciones'
),
...
@@ -91,7 +100,23 @@ class _HomePageState extends State<HomePage> {
...
@@ -91,7 +100,23 @@ class _HomePageState extends State<HomePage> {
),
),
body:
TabBarView
(
body:
TabBarView
(
children:
[
children:
[
Center
(
child:
Text
(
'Tab 1 Contenido'
)),
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Center
(
),
),
Padding
(
padding:
const
EdgeInsets
.
all
(
50.0
),
child:
ElevatedButton
(
onPressed:
_handleNewCategory
,
child:
const
Text
(
'Nueva categoria'
),
),
),
],
),
Center
(
child:
Text
(
'Tab 2 Contenido'
)),
Center
(
child:
Text
(
'Tab 2 Contenido'
)),
],
],
),
),
...
...
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