Commit 295f8ef7 by Tecnicos

En proceso...

parent a9e75540
...@@ -57,8 +57,6 @@ class _PaginaPrincipalState extends State<PaginaPrincipal> { ...@@ -57,8 +57,6 @@ class _PaginaPrincipalState extends State<PaginaPrincipal> {
); );
} }
body: construirPaginaPrincipal(),
Widget _construirCuerpo(BuildContext context) { Widget _construirCuerpo(BuildContext context) {
if(false){ if(false){
return PaginaPrincipalLlena(); return PaginaPrincipalLlena();
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class ActionButton extends StatelessWidget { class ActionButton extends StatelessWidget {
final actionButtonTypes tipoBoton;
final VoidCallback? onPressed; 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final theme = Theme.of(context);
return Directionality( return Directionality(
textDirection: TextDirection.rtl, textDirection: TextDirection.rtl,
child: FilledButton.icon( child: FilledButton.icon(
onPressed: onPressed, onPressed: onPressed,
label: Text(label, textScaler: const TextScaler.linear(1.2)), 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
...@@ -30,7 +30,6 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> { ...@@ -30,7 +30,6 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> {
children: [ children: [
GestureDetector( GestureDetector(
onTap: () { onTap: () {
print('Hola');
setState(() { setState(() {
_agregarOpen = false; _agregarOpen = false;
_convertirOpen = false; _convertirOpen = false;
...@@ -55,7 +54,7 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> { ...@@ -55,7 +54,7 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> {
List<Widget> _buildFABs() { List<Widget> _buildFABs() {
final toRet = <Widget>[]; final toRet = <Widget>[];
// Convertir FAB // FAB con las opciones para convertir
toRet.add(Stack( toRet.add(Stack(
alignment: Alignment.bottomLeft, alignment: Alignment.bottomLeft,
children: [ children: [
...@@ -64,8 +63,8 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> { ...@@ -64,8 +63,8 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> {
distance: 60, distance: 60,
icon: Icon(Icons.label_important_outline), icon: Icon(Icons.label_important_outline),
label: 'Convertir', label: 'Convertir',
children: _loadConvertirActionButtons(context), key: _convertirKey,
key: _convertirKey children: _loadConvertirActionButtons(context)
), ),
SizedBox( SizedBox(
width: 130, width: 130,
...@@ -76,7 +75,6 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> { ...@@ -76,7 +75,6 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> {
_agregarOpen = false; _agregarOpen = false;
_convertirOpen = !_convertirOpen; _convertirOpen = !_convertirOpen;
}); });
print("Hola");
_agregarKey.currentState?.close(); _agregarKey.currentState?.close();
_convertirKey.currentState?.tap(); _convertirKey.currentState?.tap();
}, },
...@@ -85,15 +83,23 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> { ...@@ -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( toRet.add(Stack(
alignment: Alignment.bottomRight, alignment: Alignment.bottomRight,
children: [ children: [
ExpandableFab( ExpandableFab(
distance: 60, distance: 60,
icon: Icon(Icons.add), icon: Icon(Icons.add),
children: _loadAgregarActionButtons(context),
key: _agregarKey, key: _agregarKey,
children: _loadAgregarActionButtons(context),
), ),
SizedBox( SizedBox(
width: 56, width: 56,
...@@ -117,64 +123,7 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> { ...@@ -117,64 +123,7 @@ class _ConVertexFabBarState extends State<ConVertexFabBar> {
List<Widget> _loadAgregarActionButtons(BuildContext context){ List<Widget> _loadAgregarActionButtons(BuildContext context){
final buttons = <Widget>[]; 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; 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
...@@ -41,6 +41,14 @@ packages: ...@@ -41,6 +41,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.19.1" 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: cupertino_icons:
dependency: "direct main" dependency: "direct main"
description: description:
...@@ -57,6 +65,22 @@ packages: ...@@ -57,6 +65,22 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.2" 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: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
...@@ -70,11 +94,24 @@ packages: ...@@ -70,11 +94,24 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.0.0" 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: flutter_test:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
leak_tracker: leak_tracker:
dependency: transitive dependency: transitive
description: description:
...@@ -147,6 +184,14 @@ packages: ...@@ -147,6 +184,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" 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: provider:
dependency: "direct main" dependency: "direct main"
description: description:
...@@ -224,6 +269,22 @@ packages: ...@@ -224,6 +269,22 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "14.3.1" 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: sdks:
dart: ">=3.7.0 <4.0.0" dart: ">=3.7.0 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54" flutter: ">=3.27.0"
...@@ -35,6 +35,7 @@ dependencies: ...@@ -35,6 +35,7 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.8 cupertino_icons: ^1.0.8
provider: ^6.1.2 provider: ^6.1.2
file_picker: ^9.0.2
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment