maxAttempts top-level property
This file contains the implementation of the WelcomePage widget. Implement the qr_code_scanner package to scan QR codes using the 'welcome_page.qrcode.dart' file.
The WelcomePage widget is responsible for displaying a welcome screen with input fields for event details, a QR code scanner, and additional options. It also handles the logic for validating the event details and launching the event link. The widget is used to gather the necessary information for joining an event. It utilizes various dependencies such as permission_handler, qr_code_scanner, url_launcher, shared_preferences, and flutter/foundation. The widget is part of the mediasfu_sdk_flutter project.
The WelcomePage widget has the following parameters:
parameters
: A map containing various callback functions and variables used for communication between the WelcomePage widget and its parent widget.
The WelcomePage widget has the following internal state:
_nameController
: A TextEditingController for the event display name input field._secretController
: A TextEditingController for the event token (secret) input field._eventIDController
: A TextEditingController for the event ID input field._linkController
: A TextEditingController for the event link input field.showAlert
: A function callback for showing an alert message.updateIsLoadingModalVisible
: A function callback for updating the visibility of a loading modal.connectSocket
: A function callback for connecting to a socket.updateSocket
: A function callback for updating the socket connection.updateValidated
: A function callback for updating the validation status.updateApiUserName
: A function callback for updating the API username.updateApiToken
: A function callback for updating the API token.updateLink
: A function callback for updating the event link.updateRoomName
: A function callback for updating the room name.updateMember
: A function callback for updating the member._isScannerVisible
: A boolean flag indicating whether the QR code scanner is visible._scannedData
: A string representing the scanned QR code data._controller
: A QRViewController for controlling the QR code scanner.hasCameraPermission
: A boolean flag indicating whether the app has camera permission._scanSubscription
: A StreamSubscription for handling the scanned QR code data.
The WelcomePage widget is a StatefulWidget, and its state is represented by the _WelcomePageState class.
The _WelcomePageState class overrides the reassemble
and initState
methods for handling camera reassembly
and initializing the state variables respectively.
The _WelcomePageState class also implements the build method for constructing the widget's UI.
The UI consists of a Scaffold with a blue background color and a Centered SingleChildScrollView.
The SingleChildScrollView contains a Column with various UI elements such as a brand logo, input fields,
a confirm button, a QR code scanner section, and additional options.
The widget also includes helper methods for handling camera reassembly, QR code view creation,
and launching URLs.
Note: This documentation comment only covers the selected code. There may be additional code and functionality in the complete file.
Implementation
int maxAttempts =
20;