build method

  1. @override
Widget build(
  1. BuildContext context
)
override

Builds the waiting screen widget.

This widget displays the transfer name and a QR code representing the transfer name.

Returns: A Scaffold widget containing the waiting screen UI.

Implementation

@override
Widget build(BuildContext context) {
  return Scaffold(
    // Set the background color of the scaffold.
    backgroundColor: Constants.backColor,
    // Center the content of the scaffold.
    body: Center(
      child: Column(
        // Align the children of the column in the center.
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          // Display the transfer name.
          Text(
            widget.transferName,
            // Set the text style for the transfer name.
            style: const TextStyle(color: Colors.white, fontSize: 24),
          ),
          // Add spacing between the transfer name and the QR code.
          const SizedBox(height: 32),
          // Display a QR code representing the transfer name.
          QrImageView(
            // Set the data to be encoded in the QR code.
            data: widget.transferName,
            // Set the version of the QR code.
            version: QrVersions.auto,
            // Set the size of the QR code.
            size: 200,
            // Set the foreground color of the QR code.
            foregroundColor: Constants.highlightColor,
          ),
        ],
      ),
    ),
  );
}