-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improved logging and added manual connection
- Loading branch information
Showing
17 changed files
with
278 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
zal_app/lib/Screens/InitialConnectionScreen/Widgets/connect_manually_widget.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; | ||
import 'package:sizer/sizer.dart'; | ||
import 'package:zal/Functions/utils.dart'; | ||
import 'package:zal/Screens/MainScreen/main_screen_providers.dart'; | ||
import 'package:zal/Screens/StorageScreen/Widgets/storage_information_widget.dart'; | ||
|
||
class ConnectManuallyWidget extends ConsumerWidget { | ||
ConnectManuallyWidget({super.key}); | ||
TextEditingController addressController = TextEditingController(text: "192.168."); | ||
@override | ||
Widget build(BuildContext context, WidgetRef ref) { | ||
return Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
mainAxisSize: MainAxisSize.min, | ||
children: [ | ||
Row( | ||
children: [ | ||
const Text("Computer Address:"), | ||
IconButton( | ||
onPressed: () { | ||
showInformationDialog(null, "You can find this address by opening Zal on your Computer, and check the bottom left corner.", context); | ||
}, | ||
icon: Icon( | ||
FontAwesomeIcons.question, | ||
size: 2.h, | ||
), | ||
), | ||
], | ||
), | ||
const SizedBox(height: 4), | ||
TextField( | ||
controller: addressController, | ||
), | ||
const SizedBox(height: 8), | ||
Align( | ||
alignment: Alignment.bottomRight, | ||
child: ElevatedButton( | ||
onPressed: () { | ||
ref.read(socketProvider.notifier).connect(null, manualAddress: addressController.text, forceConnect: true); | ||
Navigator.pop(context); | ||
}, | ||
child: const Text("Connect"))), | ||
], | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.