Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Rafa Castillo Passols
/
Prototipo-Multimedia
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8f8b1790
authored
Mar 07, 2025
by
Rafa Castillo Passols
Committed by
Tecnicos
Mar 13, 2025
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
En proceso...
parent
a9e75540
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
97 additions
and
73 deletions
lib/paginas/pagina_principal.dart
lib/widget/action_button.dart
lib/widget/convertex_fab_bar.dart
pubspec.lock
pubspec.yaml
lib/paginas/pagina_principal.dart
View file @
8f8b1790
...
...
@@ -57,8 +57,6 @@ class _PaginaPrincipalState extends State<PaginaPrincipal> {
);
}
body:
construirPaginaPrincipal
(),
Widget
_construirCuerpo
(
BuildContext
context
)
{
if
(
false
){
return
PaginaPrincipalLlena
();
...
...
lib/widget/action_button.dart
View file @
8f8b1790
import
'package:flutter/material.dart'
;
class
ActionButton
extends
StatelessWidget
{
final
actionButtonTypes
tipoBoton
;
final
VoidCallback
?
onPressed
;
final
String
label
;
final
Icon
icon
;
const
ActionButton
({
super
.
key
,
this
.
onPressed
,
required
this
.
label
,
required
this
.
icon
});
const
ActionButton
({
super
.
key
,
required
this
.
onPressed
,
required
this
.
label
,
required
this
.
icon
});
@override
Widget
build
(
BuildContext
context
)
{
final
theme
=
Theme
.
of
(
context
);
return
Directionality
(
textDirection:
TextDirection
.
rtl
,
child:
FilledButton
.
icon
(
onPressed:
onPressed
,
label:
Text
(
label
,
textScaler:
const
TextScaler
.
linear
(
1.2
)),
icon:
icon
icon:
icon
,
),
);
}
}
enum
actionButtonTypes
{
ARCHIVO
(
'Archivo'
,
Icon
(
Icons
.
description_outlined
)),
CARPETA
(
'Carpeta'
,
Icon
(
Icons
.
folder_outlined
)),
ENLACE
(
'Enlace'
,
Icon
(
Icons
.
link_outlined
)),
COPIAR
(
'Copiar'
,
Icon
(
Icons
.
copy
)),
COMPRIMIR
(
'Comprimir'
,
Icon
(
Icons
.
splitscreen_outlined
)),
REEMPLAZAR
(
'Reemplazar'
,
Icon
(
Icons
.
change_circle_outlined
));
final
String
label
;
final
Icon
icon
;
const
actionButtonTypes
(
this
.
label
,
this
.
icon
);
}
\ No newline at end of file
lib/widget/convertex_fab_bar.dart
View file @
8f8b1790
...
...
@@ -30,7 +30,6 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> {
children:
[
GestureDetector
(
onTap:
()
{
print
(
'Hola'
);
setState
(()
{
_agregarOpen
=
false
;
_convertirOpen
=
false
;
...
...
@@ -55,7 +54,7 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> {
List
<
Widget
>
_buildFABs
()
{
final
toRet
=
<
Widget
>[];
//
Convertir FAB
//
FAB con las opciones para convertir
toRet
.
add
(
Stack
(
alignment:
Alignment
.
bottomLeft
,
children:
[
...
...
@@ -64,8 +63,8 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> {
distance:
60
,
icon:
Icon
(
Icons
.
label_important_outline
),
label:
'Convertir'
,
children:
_loadConvertirActionButtons
(
context
)
,
key:
_convertirKey
key:
_convertirKey
,
children:
_loadConvertirActionButtons
(
context
)
),
SizedBox
(
width:
130
,
...
...
@@ -76,7 +75,6 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> {
_agregarOpen
=
false
;
_convertirOpen
=
!
_convertirOpen
;
});
print
(
"Hola"
);
_agregarKey
.
currentState
?.
close
();
_convertirKey
.
currentState
?.
tap
();
},
...
...
@@ -85,15 +83,23 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> {
],
));
// Agregar FAB
List
<
Widget
>
_loadConvertirActionButtons
(
BuildContext
context
){
final
buttons
=
<
Widget
>[];
return
buttons
;
}
// FAB con las opciones para agregar archivos, carpetas, enlaces...
toRet
.
add
(
Stack
(
alignment:
Alignment
.
bottomRight
,
children:
[
ExpandableFab
(
distance:
60
,
icon:
Icon
(
Icons
.
add
),
children:
_loadAgregarActionButtons
(
context
),
key:
_agregarKey
,
children:
_loadAgregarActionButtons
(
context
),
),
SizedBox
(
width:
56
,
...
...
@@ -117,64 +123,7 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> {
List
<
Widget
>
_loadAgregarActionButtons
(
BuildContext
context
){
final
buttons
=
<
Widget
>[];
for
(
var
element
in
_AgregarActionButtons
.
values
){
buttons
.
add
(
ActionButton
(
onPressed:
()
=>
_showPlaceholderAction
(
context
),
label:
element
.
label
,
icon:
element
.
icon
)
);
}
return
buttons
;
}
List
<
Widget
>
_loadConvertirActionButtons
(
BuildContext
context
){
final
buttons
=
<
Widget
>[];
for
(
var
element
in
_ConvertirActionButtons
.
values
){
buttons
.
add
(
ActionButton
(
onPressed:
()
=>
_showPlaceholderAction
(
context
),
label:
element
.
label
,
icon:
element
.
icon
)
);
}
return
buttons
;
}
void
_showPlaceholderAction
(
BuildContext
context
)
{
showDialog
<
void
>(
context:
context
,
builder:
(
context
)
{
return
AlertDialog
(
content:
Text
(
'Funcionalidad a implementar'
),
actions:
[
TextButton
(
onPressed:
()
=>
Navigator
.
of
(
context
).
pop
(),
child:
const
Text
(
'CLOSE'
),
),
],
);
},
);
}
}
enum
_AgregarActionButtons
{
NUEVO_ARCHIVO
(
'Archivo'
,
Icon
(
Icons
.
description_outlined
)),
NUEVA_CARPETA
(
'Carpeta'
,
Icon
(
Icons
.
folder_outlined
)),
NUEVO_ENLACE
(
'Enlace'
,
Icon
(
Icons
.
link_outlined
));
final
String
label
;
final
Icon
icon
;
const
_AgregarActionButtons
(
this
.
label
,
this
.
icon
);
}
enum
_ConvertirActionButtons
{
COPIAR_ARCHIVOS
(
'Copiar'
,
Icon
(
Icons
.
copy
)),
COMPRIMIR_ARCHIVOS
(
'Comprimir'
,
Icon
(
Icons
.
splitscreen_outlined
)),
REEMPLAZAR_ARCHIVOS
(
'Reemplazar'
,
Icon
(
Icons
.
change_circle_outlined
));
final
String
label
;
final
Icon
icon
;
const
_ConvertirActionButtons
(
this
.
label
,
this
.
icon
);
}
\ No newline at end of file
pubspec.lock
View file @
8f8b1790
...
...
@@ -41,6 +41,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.19.1"
cross_file:
dependency: transitive
description:
name: cross_file
sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670"
url: "https://pub.dev"
source: hosted
version: "0.3.4+2"
cupertino_icons:
dependency: "direct main"
description:
...
...
@@ -57,6 +65,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.2"
ffi:
dependency: transitive
description:
name: ffi
sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
file_picker:
dependency: "direct main"
description:
name: file_picker
sha256: "7423298f08f6fc8cce05792bae329f9a93653fc9c08712831b1a55540127995d"
url: "https://pub.dev"
source: hosted
version: "9.0.2"
flutter:
dependency: "direct main"
description: flutter
...
...
@@ -70,11 +94,24 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.0.0"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: "5a1e6fb2c0561958d7e4c33574674bda7b77caaca7a33b758876956f2902eea3"
url: "https://pub.dev"
source: hosted
version: "2.0.27"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
leak_tracker:
dependency: transitive
description:
...
...
@@ -147,6 +184,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.1"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
url: "https://pub.dev"
source: hosted
version: "2.1.8"
provider:
dependency: "direct main"
description:
...
...
@@ -224,6 +269,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "14.3.1"
web:
dependency: transitive
description:
name: web
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
win32:
dependency: transitive
description:
name: win32
sha256: b89e6e24d1454e149ab20fbb225af58660f0c0bf4475544650700d8e2da54aef
url: "https://pub.dev"
source: hosted
version: "5.11.0"
sdks:
dart: ">=3.7.0 <4.0.0"
flutter: ">=3.
18.0-18.0.pre.54
"
flutter: ">=3.
27.0
"
pubspec.yaml
View file @
8f8b1790
...
...
@@ -35,6 +35,7 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons
:
^1.0.8
provider
:
^6.1.2
file_picker
:
^9.0.2
dev_dependencies
:
flutter_test
:
...
...
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