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
cf5c4977
Commit
cf5c4977
authored
Jul 31, 2024
by
nayeli92433
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI home con boton
parent
b3bc340f
Hide 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 @
cf5c4977
...
...
@@ -24,6 +24,16 @@ class HomePage extends StatefulWidget {
class
_HomePageState
extends
State
<
HomePage
>
{
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
Widget
build
(
BuildContext
context
)
{
return
DefaultTabController
(
...
...
@@ -75,7 +85,6 @@ class _HomePageState extends State<HomePage> {
Navigator
.
pop
(
context
);
// Close the drawer
},
),
ListTile
(
leading:
const
Icon
(
Icons
.
settings
),
title:
const
Text
(
'Configuraciones'
),
...
...
@@ -91,7 +100,23 @@ class _HomePageState extends State<HomePage> {
),
body:
TabBarView
(
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'
)),
],
),
...
...
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